From 84f2c73a15d9699c5d2e8667af0d2a987cb467d4 Mon Sep 17 00:00:00 2001 From: jpwithers Date: Tue, 12 Apr 2022 19:33:51 -0700 Subject: [PATCH 1/2] implements mergify on ci:ready_to_merge tag --- .github/mergify.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 9e715eb3..a1a40cf2 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,17 +1,25 @@ queue_rules: - name: default conditions: - - label=ci:mergify + - base=main + - label=ci:ready_to_merge pull_request_rules: - name: push to default merge queue conditions: - base=main - - label=ci:mergify - - check-success=cla/google + - label=ci:ready_to_merge actions: queue: name: default require_branch_protection: true method: squash + + - name: remove ci:ready_to_merge label + conditions: + - merged + actions: + label: + remove: + - ci:ready_to_merge From fea747e7541fc62a813ae7116898dfe70a2463ef Mon Sep 17 00:00:00 2001 From: jpwithers Date: Tue, 12 Apr 2022 19:36:32 -0700 Subject: [PATCH 2/2] add ci:run tag to mergify queues --- .github/workflows/apply_cirun.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/apply_cirun.yml diff --git a/.github/workflows/apply_cirun.yml b/.github/workflows/apply_cirun.yml new file mode 100644 index 00000000..c6db43f0 --- /dev/null +++ b/.github/workflows/apply_cirun.yml @@ -0,0 +1,19 @@ +on: + pull_request_target: + types: [synchronize] + +jobs: + apply-label: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'ci:ready_to_merge') + steps: + - uses: actions/github-script@v5 + with: + github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }} + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['ci:run'] + })