fix: remove pr:e2e:couchdb label on run completion (#6628)

* fix: trigger e2e-couchdb run on sync

* fix: remove `e2e-couchdb` label if present after run

* fix: remove `synchronize` trigger

- this is intended behavior

* refactor: update GHA to use octokit action

* docs: add note about GHA warnings

* fix: remove `pr:e2e` label after run

* fix: use github-script
This commit is contained in:
Jesse Mazzella 2023-05-03 10:24:41 -07:00 committed by GitHub
parent fe677fa359
commit 549a579bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View File

@ -41,3 +41,16 @@ jobs:
uses: actions/upload-artifact@v3
with:
path: html-test-results
- name: Remove pr:e2e:couchdb label (if present)
if: ${{ contains(github.event.pull_request.labels.*.name, 'pr:e2e:couchdb') }}
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e:couchdb';
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});

View File

@ -66,3 +66,16 @@ jobs:
repo: "openmct",
body: 'Failure ❌ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/' + context.runId
})
- name: Remove pr:e2e label (if present)
if: ${{ contains(github.event.pull_request.labels.*.name, 'pr:e2e') }}
uses: actions/github-script@v6
with:
script: |
const { owner, repo, number } = context.issue;
const labelToRemove = 'pr:e2e';
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: number,
name: labelToRemove
});