Skip to content

Commit abf93c0

Browse files
ci: update splice-bot, enable splice-bot merge (leanprover-community#36935)
This bumps the version of the SpliceBot ([changes](leanprover-community/SpliceBot@146ee71...a463ae1)) to include support for "label commands" and gives `mathlib-splicebot` the ability to use the `auto-merge-after-CI` label. After this is merged, maintainers will be able to type `splice-bot merge` in a pull request review comment and the splicebot will do its thing, and also apply the `auto-merge-after-CI` label, which will cause the PR to be merged if CI passes. Note that this also makes normal usage stricter -- `splice-bot trailing text` will be interpreted as a label command, and will fail. The `label_command` input is set to a repo variable so that we can adjust it if needed without opening a PR. For now I have added the following in the `SPLICEBOT_LABEL_COMMANDS` variable: ```json [ { "command": "merge", "label": "auto-merge-after-CI", "min_repo_permission": "disabled", "allowed_teams": ["leanprover-community/mathlib-maintainers"] } ] ```
1 parent 97434d4 commit abf93c0

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/build_template.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,8 @@ jobs:
937937
- if: >- # bot usernames will cause this step to error with "Could not resolve to a User..."
938938
contains(steps.PR.outputs.pr_labels, 'auto-merge-after-CI') &&
939939
steps.get-label-actor.outputs.username != 'mathlib-nolints' &&
940-
steps.get-label-actor.outputs.username != 'mathlib-update-dependencies'
940+
steps.get-label-actor.outputs.username != 'mathlib-update-dependencies' &&
941+
steps.get-label-actor.outputs.username != 'mathlib-splicebot'
941942
name: check team membership
942943
uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v3.0.0
943944
id: actorTeams
@@ -952,6 +953,7 @@ jobs:
952953
(
953954
steps.get-label-actor.outputs.username == 'mathlib-nolints' ||
954955
steps.get-label-actor.outputs.username == 'mathlib-update-dependencies' ||
956+
steps.get-label-actor.outputs.username == 'mathlib-splicebot' ||
955957
contains(steps.actorTeams.outputs.teams, 'mathlib-maintainers') ||
956958
contains(steps.actorTeams.outputs.teams, 'bot-users')
957959
)

.github/workflows/splice_bot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions: {}
99
jobs:
1010
call-splice-bot:
1111
if: ${{ contains(github.event.comment.body, 'splice-bot') }}
12-
uses: leanprover-community/SpliceBot/.github/workflows/splice.yaml@fdb442693d6f613b25d2599ad64fd87cf019b9ce # master
12+
uses: leanprover-community/SpliceBot/.github/workflows/splice.yaml@a463ae17022e8eb5929a208c1b136aeebcaf77e1 # master
1313
with:
1414
# Optional override; omit to use the reusable workflow's default "master"
1515
base_ref: master

.github/workflows/splice_bot_wf_run.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ jobs:
4545
owner: leanprover-community
4646

4747
- name: Run splice bot action
48-
uses: leanprover-community/SpliceBot/.github/actions/splice-wf-run@146ee716fab40e9cae384b9932fded8b9999b16d
48+
uses: leanprover-community/SpliceBot/.github/actions/splice-wf-run@a463ae17022e8eb5929a208c1b136aeebcaf77e1
4949
with:
5050
source_workflow: ${{ github.event.workflow_run.name }}
5151
push_to_fork: leanprover-community/mathlib4_copy
52-
min_repo_permission: 'write'
52+
min_repo_permission: 'disabled'
5353
allow_pr_author: 'true'
5454
allowed_teams: |
5555
leanprover-community/mathlib-reviewers
5656
leanprover-community/mathlib-maintainers
5757
token: ${{ steps.token.outputs.token }}
5858
authz_token: ${{ steps.authz-token.outputs.token }}
5959
branch_token: ${{ steps.branch-token.outputs.token }}
60+
label_commands: ${{ vars.SPLICEBOT_LABEL_COMMANDS }}

0 commit comments

Comments
 (0)