-
Notifications
You must be signed in to change notification settings - Fork 316
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 FR_dep_setoid_rel
- Loading branch information
Showing
3,117 changed files
with
87,070 additions
and
35,093 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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 |
---|---|---|
|
@@ -7,50 +7,15 @@ on: | |
jobs: | ||
add_ready_to_merge_label: | ||
name: Add ready-to-merge label | ||
if: (toJSON(github.event.issue.pull_request) != 'null') && (startsWith(github.event.comment.body, 'bors r+') || contains(toJSON(github.event.comment.body), '\r\nbors r+') || startsWith(github.event.comment.body, 'bors merge') || contains(toJSON(github.event.comment.body), '\r\nbors merge')) | ||
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'bors r+') || contains(toJSON(github.event.comment.body), '\nbors r+') || startsWith(github.event.comment.body, 'bors merge') || contains(toJSON(github.event.comment.body), '\nbors merge')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: octokit/[email protected] | ||
name: Get PR head | ||
id: get_pr_head | ||
- id: user_permission | ||
uses: actions-cool/check-user-permission@v2 | ||
with: | ||
route: GET /repos/:repository/pulls/:pull_number | ||
repository: ${{ github.repository }} | ||
pull_number: ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Parse steps.get_pr_head.outputs.data, since it is a string | ||
- id: parse_pr_head | ||
name: Parse PR head | ||
uses: gr2m/[email protected] | ||
with: | ||
json: ${{ steps.get_pr_head.outputs.data }} | ||
head_user: 'head.user.login' | ||
|
||
# we skip the rest if this PR is from a fork, | ||
# since the GITHUB_TOKEN doesn't have write perms | ||
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | ||
uses: octokit/[email protected] | ||
name: Get comment author | ||
id: get_user | ||
with: | ||
route: GET /repos/:repository/collaborators/:username/permission | ||
repository: ${{ github.repository }} | ||
username: ${{ github.event.comment.user.login }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Parse steps.get_user.outputs.data, since it is a string | ||
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | ||
id: parse_user | ||
name: Parse comment author permission | ||
uses: gr2m/[email protected] | ||
with: | ||
json: ${{ steps.get_user.outputs.data }} | ||
permission: 'permission' | ||
require: 'admin' | ||
|
||
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | ||
- if: (steps.user_permission.outputs.require-result == 'true') || (github.event.comment.user.login == 'leanprover-community-mathlib4-bot') || (github.event.comment.user.login == 'leanprover-community-bot-assistant') | ||
uses: octokit/[email protected] | ||
id: add_label | ||
name: Add label | ||
|
@@ -62,7 +27,7 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | ||
- if: (steps.user_permission.outputs.require-result == 'true') || (github.event.comment.user.login == 'leanprover-community-mathlib4-bot') || (github.event.comment.user.login == 'leanprover-community-bot-assistant') | ||
id: remove_labels | ||
name: Remove "awaiting-author" | ||
# we use curl rather than octokit/request-action so that the job won't fail | ||
|
@@ -74,50 +39,15 @@ jobs: | |
add_delegated_label: | ||
name: Add delegated label | ||
if: (toJSON(github.event.issue.pull_request) != 'null') && (startsWith(github.event.comment.body, 'bors d') || contains(toJSON(github.event.comment.body), '\r\nbors d')) | ||
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'bors d') || contains(toJSON(github.event.comment.body), '\nbors d')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: octokit/[email protected] | ||
name: Get PR head | ||
id: get_pr_head | ||
with: | ||
route: GET /repos/:repository/pulls/:pull_number | ||
repository: ${{ github.repository }} | ||
pull_number: ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Parse steps.get_pr_head.outputs.data, since it is a string | ||
- id: parse_pr_head | ||
name: Parse PR head | ||
uses: gr2m/[email protected] | ||
with: | ||
json: ${{ steps.get_pr_head.outputs.data }} | ||
head_user: 'head.user.login' | ||
|
||
# we skip the rest if this PR is from a fork, | ||
# since the GITHUB_TOKEN doesn't have write perms | ||
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | ||
uses: octokit/[email protected] | ||
name: Get comment author | ||
id: get_user | ||
with: | ||
route: GET /repos/:repository/collaborators/:username/permission | ||
repository: ${{ github.repository }} | ||
username: ${{ github.event.comment.user.login }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Parse steps.get_user.outputs.data, since it is a string | ||
- if: steps.parse_pr_head.outputs.head_user == 'leanprover-community' | ||
id: parse_user | ||
name: Parse comment author permission | ||
uses: gr2m/[email protected] | ||
- id: user_permission | ||
uses: actions-cool/check-user-permission@v2 | ||
with: | ||
json: ${{ steps.get_user.outputs.data }} | ||
permission: 'permission' | ||
require: 'admin' | ||
|
||
- if: (steps.parse_pr_head.outputs.head_user == 'leanprover-community') && (steps.parse_user.outputs.permission == 'admin') | ||
- if: (steps.user_permission.outputs.require-result == 'true') || (github.event.comment.user.login == 'leanprover-community-mathlib4-bot') || (github.event.comment.user.login == 'leanprover-community-bot-assistant') | ||
uses: octokit/[email protected] | ||
id: add_label | ||
name: Add label | ||
|
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,42 @@ | ||
name: Autolabel PRs | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
push: | ||
paths: | ||
- scripts/autolabel.lean | ||
- .github/workflows/add_label_from_diff.yaml | ||
|
||
jobs: | ||
add_topic_label: | ||
name: Add topic label | ||
runs-on: ubuntu-latest | ||
# Don't run on forks, where we wouldn't have permissions to add the label anyway. | ||
if: github.repository == 'leanprover-community/mathlib4' | ||
permissions: | ||
issues: write | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: install elan | ||
run: | | ||
set -o pipefail | ||
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | ||
- name: lake exe autolabel | ||
run: | | ||
# the checkout dance, to avoid a detached head | ||
git checkout master | ||
git checkout - | ||
lake exe autolabel "$NUMBER" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
NUMBER: ${{ github.event.number }} |
Oops, something went wrong.