-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into vi.incomp
- Loading branch information
Showing
797 changed files
with
16,621 additions
and
6,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Add "closed-pr" emoji in Zulip | ||
# adds a reaction to Zulip messages that refer to a PR that was closed, but not merged | ||
|
||
# triggers the action when | ||
on: | ||
pull_request: | ||
# the pull request is closed or reopened, to add or remove the emoji | ||
types: [closed, reopened] | ||
|
||
jobs: | ||
add_closed_pr_emoji: | ||
# we set the `TITLE` of the PR as a variable, this shields from possible code injection | ||
env: | ||
TITLE: ${{ github.event.pull_request.title }} | ||
|
||
name: Add closed-pr emoji in Zulip | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Debugging information | ||
run: | | ||
# may be superfluous: GitHub may print the values of the environment variables by default | ||
printf '%s' "${TITLE}" | hexdump -cC | ||
printf 'PR title:"%s"\n' "${TITLE}" | ||
printf 'issue number: "%s"\npull request number: "%s"\n' "${{ github.event.issue.number }}" "${{ github.event.pull_request.number }}" | ||
- name: Set up Python | ||
if: ${{ ! startsWith(github.event.pull_request.title, '[Merged by Bors]') || | ||
github.event_name == 'reopened' }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
if: ${{ ! startsWith(github.event.pull_request.title, '[Merged by Bors]') || | ||
github.event_name == 'reopened' }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install zulip | ||
- name: checkout zulip_emoji_merge_delegate script | ||
if: ${{ ! startsWith(github.event.pull_request.title, '[Merged by Bors]') || | ||
github.event_name == 'reopened' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
scripts/zulip_emoji_merge_delegate.py | ||
- name: Run Zulip Emoji Merge Delegate Script | ||
if: ${{ ! startsWith(github.event.pull_request.title, '[Merged by Bors]') || | ||
github.event_name == 'reopened' }} | ||
env: | ||
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }} | ||
ZULIP_EMAIL: [email protected] | ||
ZULIP_SITE: https://leanprover.zulipchat.com | ||
run: | | ||
# ${{ github.event.action }} is either "closed" or "reopened" | ||
# however, it only matters that it is either "closed" or | ||
# something different from "closed" | ||
# the effect is to add the "closed-pr" emoji to the message, if it is "closed" | ||
# and to remove it otherwise | ||
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "${{ github.event.action }}" "${{ github.event.pull_request.number }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.