Skip to content

Commit b8ec03b

Browse files
committed
Merge branch 'master' into j-loreaux/CompleteLattice.Group
2 parents 8ab9ac8 + d7cd016 commit b8ec03b

102 files changed

Lines changed: 4025 additions & 1429 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/build.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ jobs:
512512
build_and_lint:
513513
name: CI Success
514514
if: FORK_CONDITION
515-
needs: [style_lint, build]
515+
needs: [style_lint, post_steps]
516516
runs-on: ubuntu-latest
517517
steps:
518518
- name: succeed

.github/workflows/PR_summary.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Post PR summary comment
33
on:
44
pull_request_target:
55

6+
# Limit permissions for GITHUB_TOKEN for the entire workflow
7+
permissions:
8+
contents: read
9+
pull-requests: write # Only allow PR comments/labels
10+
# All other permissions are implicitly 'none'
11+
612
jobs:
713
build:
814
name: "post-or-update-summary-comment"
Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,64 @@
11
name: Autolabel PRs
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened]
66
push:
77
paths:
88
- scripts/autolabel.lean
99
- .github/workflows/add_label_from_diff.yaml
1010

11+
# Limit permissions for GITHUB_TOKEN for the entire workflow
12+
permissions:
13+
contents: read
14+
pull-requests: write # Only allow PR comments/labels
15+
# All other permissions are implicitly 'none'
16+
1117
jobs:
1218
add_topic_label:
1319
name: Add topic label
1420
runs-on: ubuntu-latest
1521
# Don't run on forks, where we wouldn't have permissions to add the label anyway.
1622
if: github.repository == 'leanprover-community/mathlib4'
17-
permissions:
18-
issues: write
19-
checks: write
20-
pull-requests: write
21-
contents: read
2223
steps:
23-
- name: Checkout code
24-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
with:
26-
fetch-depth: 0
27-
- name: Configure Lean
28-
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
29-
with:
30-
auto-config: false
31-
use-github-cache: false
32-
use-mathlib-cache: false
33-
- name: lake exe autolabel
34-
run: |
35-
# the checkout dance, to avoid a detached head
36-
git checkout master
37-
git checkout -
38-
lake exe autolabel "$NUMBER"
39-
env:
40-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
GH_REPO: ${{ github.repository }}
42-
NUMBER: ${{ github.event.number }}
24+
- name: Checkout code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
fetch-depth: 0
29+
- name: Configure Lean
30+
uses: leanprover/lean-action@f807b338d95de7813c5c50d018f1c23c9b93b4ec # 2025-04-24
31+
with:
32+
auto-config: false
33+
use-github-cache: false
34+
use-mathlib-cache: false
35+
- name: lake exe autolabel
36+
run: |
37+
# the checkout dance, to avoid a detached head
38+
git checkout master
39+
git checkout -
40+
labels="$(lake exe autolabel)"
41+
printf '%s\n' "${labels}"
42+
# extract
43+
label="$(printf '%s' "${labels}" | sed -n 's=.*#\[\([^,]*\)\].*=\1=p')"
44+
printf 'label: "%s"\n' "${label}"
45+
if [ -n "${label}" ]
46+
then
47+
printf 'Applying label %s\n' "${label}"
48+
# we use curl rather than octokit/request-action so that the job won't fail
49+
# (and send an annoying email) if the labels don't exist
50+
url="https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels"
51+
printf 'url: %s\n' "${url}"
52+
jsonLabel="$(printf '{"labels":["%s"]}' "${label}")"
53+
printf 'jsonLabel: %s\n' "${jsonLabel}"
54+
curl --request POST \
55+
--header 'Accept: application/vnd.github+json' \
56+
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
57+
--header 'X-GitHub-Api-Version: 2022-11-28' \
58+
--url "${url}" \
59+
--data "${jsonLabel}"
60+
else
61+
echo "There is no single label that we could apply, so we are not applying any label."
62+
fi
63+
env:
64+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ jobs:
522522
build_and_lint:
523523
name: CI Success
524524
if: true
525-
needs: [style_lint, build]
525+
needs: [style_lint, post_steps]
526526
runs-on: ubuntu-latest
527527
steps:
528528
- name: succeed

.github/workflows/bot_fix_style.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
with:
3232
mode: fix
3333
lint-bib-file: true
34-
bot-fix-style-token: ${{ secrets.GITHUB_TOKEN }}
34+
BOT_FIX_STYLE_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ jobs:
529529
build_and_lint:
530530
name: CI Success
531531
if: true
532-
needs: [style_lint, build]
532+
needs: [style_lint, post_steps]
533533
runs-on: ubuntu-latest
534534
steps:
535535
- name: succeed

.github/workflows/build_fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ jobs:
526526
build_and_lint:
527527
name: CI Success
528528
if: github.event.pull_request.head.repo.fork
529-
needs: [style_lint, build]
529+
needs: [style_lint, post_steps]
530530
runs-on: ubuntu-latest
531531
steps:
532532
- name: succeed

.github/workflows/daily.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
jobs:
1616
check-lean4checker:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'leanprover-community/mathlib4'
1819
strategy:
1920
matrix:
2021
branch_type: [master, nightly]

.github/workflows/label_new_contributor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name: Label New Contributors
44

55
on: pull_request_target
66

7+
# Limit permissions for GITHUB_TOKEN for the entire workflow
8+
permissions:
9+
contents: read
10+
pull-requests: write # Only allow PR comments/labels
11+
# All other permissions are implicitly 'none'
12+
713
jobs:
814
label-and-report-new-contributor:
915
runs-on: ubuntu-latest

.github/workflows/latest_import.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
late-importers:
1313
name: Build
1414
runs-on: pr
15+
if: github.repository == 'leanprover-community/mathlib4'
1516
steps:
1617
- name: cleanup
1718
run: |

0 commit comments

Comments
 (0)