-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger CI for leanprover-community/batteries#1063
- Loading branch information
Showing
96 changed files
with
2,235 additions
and
1,664 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
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 |
---|---|---|
|
@@ -84,4 +84,36 @@ jobs: | |
curl --request DELETE \ | ||
--url "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}${{ github.event.pull_request.number }}/labels/awaiting-author" \ | ||
--header 'authorization: Bearer ${{ secrets.TRIAGE_TOKEN }}' | ||
# comment uses ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Python | ||
if: ${{ ! steps.merge_or_delegate.outputs.mOrD == '' && | ||
( steps.user_permission.outputs.require-result == 'true' || | ||
steps.merge_or_delegate.outputs.bot == 'true' ) }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
if: ${{ ! steps.merge_or_delegate.outputs.mOrD == '' && | ||
( steps.user_permission.outputs.require-result == 'true' || | ||
steps.merge_or_delegate.outputs.bot == 'true' ) }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install zulip | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
sparse-checkout: | | ||
scripts/zulip_emoji_merge_delegate.py | ||
- name: Run Zulip Emoji Merge Delegate Script | ||
if: ${{ ! steps.merge_or_delegate.outputs.mOrD == '' && | ||
( steps.user_permission.outputs.require-result == 'true' || | ||
steps.merge_or_delegate.outputs.bot == 'true' ) }} | ||
env: | ||
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }} | ||
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" "${{ steps.merge_or_delegate.outputs.mOrD }}" "${{ github.event.issue.number }}${{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
name: Zulip Emoji Merge Delegate | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' # Runs every hour | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
zulip-emoji-merge-delegate: | ||
zulip-emoji-merged: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout mathlib repository | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
scripts | ||
fetch-depth: 0 # donwload the full repository | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
@@ -30,6 +30,13 @@ jobs: | |
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }} | ||
ZULIP_EMAIL: [email protected] | ||
ZULIP_SITE: https://leanprover.zulipchat.com | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "$GITHUB_TOKEN" | ||
# scan the commits of the past 10 minutes, assuming that the timezone of the current machine | ||
# is the same that performed the commit | ||
git log --since="10 minutes ago" --pretty=oneline | ||
printf $'Scanning commits:\n%s\n\nContinuing\n' "$(git log --since="10 minutes ago" --pretty=oneline)" | ||
while read -r pr_number; do | ||
printf $'Running the python script with pr "%s"\n' "${pr_number}" | ||
python scripts/zulip_emoji_merge_delegate.py "$ZULIP_API_KEY" "$ZULIP_EMAIL" "$ZULIP_SITE" "[Merged by Bors]" "${pr_number}" | ||
done < <(git log --oneline -n 10 | awk -F# '{ gsub(/)$/, ""); print $NF}') |
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.