Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Upgrade Workflows/Actions #27

Merged
merged 26 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/LGTM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: LGTM Check
on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-comments:
runs-on: ubuntu-latest
steps:
- name: Check for LGTM comment
uses: actions/github-script@v5
with:
script: |
const issue_number = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;

const comments = await github.rest.issues.listComments({
issue_number: issue_number,
owner: owner,
repo: repo
});

for (const comment of comments.data) {
if (comment.body.includes('LGTM')) {
console.log('LGTM comment found!');
await github.rest.pulls.createReview({
owner: owner,
repo: repo,
pull_number: issue_number,
event: 'APPROVE',
body: 'LGTM comment found, approving!'
});
return;
}
}

await github.rest.pulls.createReview({
owner: owner,
repo: repo,
pull_number: issue_number,
event: 'REQUEST_CHANGES',
body: 'No LGTM comment found, please add one.'
});
throw new Error('No LGTM comment found!');
55 changes: 0 additions & 55 deletions .github/workflows/checkmarx-one.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/label.yml

This file was deleted.

Loading