-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(CI): Zulip :closed-pr:
emoji reaction
#20902
Conversation
PR summary b44c5dbddbImport 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks plausible at first side. The python changes LGTM (assuming one of them is just a type). I'd need to look at the workflow more closely and compare it to the others.
:closed-pr:
emoji reaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look. Looks good in general; I think this can land soon.
I suspect there may be one or two bugs, but these should be easy to fix. (Did you test this locally? Or is the only way to test this to run it in production?)
Finally, I wonder if this does what we want.
Currently, this workflow only runs on closed PRs that were merged by bors. This means
- it won't apply to PRs which are closed (because the PR is superseded, or not suitable for mathlib, or some other reasons) but unmerged
- it does not run on merged PRs (these also exist, e.g. mathlib adaptation PRs, or somebody updating their personal fork). I think those PRs could also be nice to handle...
What do you think?
In any case: can you please document the intended behaviour in the workflow, say with a comment on top? Having merged PRs be "closed", not "merged", is a mathlib peculiarity: this might not be obvious for the readers of this file.
ZULIP_EMAIL: [email protected] | ||
ZULIP_SITE: https://leanprover.zulipchat.com | ||
run: | | ||
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "closed" "${{ github.event.issue.number }}${{ github.event.pull_request.number }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be the following?
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "closed" "${{ github.event.issue.number }}${{ github.event.pull_request.number }}" | |
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "closed" "${{ github.event.issue.number }}" "${{ github.event.pull_request.number }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is correct as is: at most one is defined, probably github.event.pull_request.number
, but I won't know for sure until this gets tested and the previous CI step tells me what the numbers are! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine. Can you either add a comment or follow up with a PR deleting the wrong one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was planning to follow up with PRs fixing this mistake (and the other ones that are likely present! 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, works for me :-)
Testing locally is hard, since GitHub will run this script only once it is in master. The idea is that we try our best, test it as soon as it enters mathlib and then fix the issues quickly! Since closing un-merged PRs is not common and the consequence of the script malfunctioning are adding a weird zulip reaction, there is not much at stake! |
Why do you say that? I think that this will run on all closed PRs, regardless of who closed them. The ones that get closed by bors will have been renamed to The remaining PRs will likely
|
Indeed, I was tired and overlooked the negation 🤦♂️ Right, so this labels all closed PRs that have not been labelled by bors. This makes sense. |
The new changes look good. I'm still not sure about the cone option, but we can totally YOLO-deploy it and merge this PR. We need to test it live anyway. |
🚀 Pull request has been placed on the maintainer queue by grunweg. |
🚀 Pull request has been placed on the maintainer queue by grunweg. |
Thanks 🎉 bors merge |
Add a workflow that is triggered by closing a PR. If the PR does title not start with `[Merged by Bors]`, then the script adds the `:closed-pr:` emoji reaction to messages on Zulip that link to the PR number.
Pull request successfully merged into master. Build succeeded: |
:closed-pr:
emoji reaction:closed-pr:
emoji reaction
Add a workflow that is triggered by closing a PR. If the PR does title not start with
[Merged by Bors]
, then the script adds the:closed-pr:
emoji reaction to messages on Zulip that link to the PR number.