chore: revert

This commit is contained in:
DIBSTER authored and GitHub committed 2024-12-26 18:01:36 -05:00
1 parent e280108dbb
commit 5e85638396
1 file changed
+9 -33
+9 -33
View File
@@ -3,7 +3,7 @@ on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
types: [opened,closed,synchronize]
jobs:
CLAAssistant:
@@ -14,59 +14,35 @@ jobs:
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: "CLA Assistant"
id: cla_assistant_step
if: (github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/github-action@v2.6.1
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ steps.create_token.outputs.token }}
with:
path-to-signatures: 'signatures-v3.json'
path-to-document: 'https://github.com/open-domains/register/blob/main/terms.md'
path-to-document: 'https://github.com/open-domains/register/blob/main/terms.md' # e.g. a CLA or a DCO document
# branch should not be protected
branch: 'main'
allowlist: od-bot,bot*,kyro3400
remote-organization-name: 'open-domains'
remote-repository-name: 'cla'
lock-pullrequest-aftermerge: false
- name: Re-run CLA Check if "recheck"
if: github.event.comment.body == 'recheck'
uses: actions/github-script@v6
with:
script: |
const octokit = github.getOctokit(process.env.GITHUB_TOKEN)
const { data: checkRuns } = await octokit.rest.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha,
check_name: 'CLA / CLAAssistant (pull_request_target)'
});
if(checkRuns.total_count > 0){
const checkRunId = checkRuns.check_runs[0].id;
await octokit.rest.checks.rerequestCheckRun({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: checkRunId
});
console.log("CLA check re-run has been triggered")
} else {
console.log("CLA check not found")
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: add CLA signed
uses: actions-ecosystem/action-add-labels@v1
if: (github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
with:
labels: "CLA Signed"
github_token: ${{ steps.create_token.outputs.token }}
- name: remove CLA required
uses: actions-ecosystem/action-remove-labels@v1
if: (github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
with:
labels: "CLA Required"
github_token: ${{ steps.create_token.outputs.token }}