From d0b0f16b583db42a47f71d66fc3e88cc37b04ab8 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Wed, 6 Dec 2023 16:26:54 +0200 Subject: [PATCH] ci: special labels to trigger integration tests --- .github/workflows/delabeler.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/delabeler.yml diff --git a/.github/workflows/delabeler.yml b/.github/workflows/delabeler.yml new file mode 100644 index 0000000..eb5f74b --- /dev/null +++ b/.github/workflows/delabeler.yml @@ -0,0 +1,35 @@ +name: "Pull Request Delabeler" + +on: + pull_request_target: + # type 'opened' is not included, so maintainers can create PRs with labels + # specified during creation. + types: [edited, closed, reopened, synchronize, converted_to_draft] + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const special = 'Review: Core +1' + const labels = await github.rest.issues.listLabelsOnIssue({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo + }) + + if (!labels.data.map((x) => x.name).includes(special)) { + return + } + + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: [special] + })