ci: refactor maintainer_*.yml workflows to use new helper actions#35110
ci: refactor maintainer_*.yml workflows to use new helper actions#35110bryangingechen wants to merge 3 commits intoleanprover-community:masterfrom
Conversation
…on-bridge actions
PR summary 7e516e0ca6Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
|
|
||
| - if: ${{ ! steps.merge_or_delegate.outputs.mOrD == '' || ! steps.merge_or_delegate.outputs.removeLabels == '' }} | ||
| name: Emit bridge artifact | ||
| uses: leanprover-community/privilege-escalation-bridge/emit@v1 |
There was a problem hiding this comment.
I will change this uses (and the reference in the other file to /consume) to point to a specific commit after I'm more confident that the actions are stable.
bryangingechen
left a comment
There was a problem hiding this comment.
Removed an unused variable BOT that shellcheck was complaning about and also removed the expected_head_sha checks from the consume inputs since that check is brittle (could depend on merge SHA which changes when master changes).
joneugster
left a comment
There was a problem hiding this comment.
Looks good, thanks!
I guess my only question is about how the existing workflow worked, not your reimplementation...
| sparse-checkout: | | ||
| scripts/zulip_emoji_reactions.py | ||
|
|
||
| - name: update zulip emoji reactions |
There was a problem hiding this comment.
I don't see where this has been moved to? Why is it that this used to be present in both workflows?
There was a problem hiding this comment.
Good catch! I need to add these back since they were used to add the :bors: and maintainer merge emoji reactions.
The workflows
maintainer_{bors,merge}.ymlworkflows were rewritten in #26288 so that they were split into two workflows. The first workflow is triggered by an issue comment, PR review, or PR review comment and does not have access to secrets. The second workflow is triggered by the successful completion of the first workflow and does the actual labeling of the PR using its access to secrets. Data about the PR and the triggering comment / review is passed between workflows by use of a workflow artifact. It turns out this is a fairly useful pattern, so I've created leanprover-community/privilege-escalation-brdge with some helper actions that we will be able to use in more workflows.This PR refactors the abovementioned PRs to use the new actions. There is a slight change in behavior: previously PRs which were opened from a branch in this repo (as opposed to a branch in a fork) would just be handled using some steps in the first workflow (since the workflow does get access to secrets for such PRs) and the second workflow would not be triggered. Now all PRs are treated equally -- they all go through both workflows. This will slow down labeling for the (rare) PRs which are still opened from branches in this repo, however, I think that's outweighed by the resulting simplification of the workflows. Other than this though the behavior should be unchanged.
Prepared with codex.