Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && format('-review-{0}', github.run_id) || '' }}
cancel-in-progress: true

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
file-changes:
name: Detect File Changes
if: >
github.event_name != 'pull_request_review' ||
github.event.review.user.type != 'Bot'
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,17 @@ jobs:
exit 1
fi

PR_HEAD_REF="$(gh pr view "$PR_NUMBER" --repo "${{ github.repository }}" --json headRefName --jq .headRefName)"

echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "pr_head_ref=$PR_HEAD_REF" >> "$GITHUB_OUTPUT"

# Base repo only. This job is privileged (pull_request_target / issue_comment:
# it holds secrets and a write-capable token), so the PR head is never checked
# out or fetched here. The diff and per-file context are pulled through the gh
# API in later steps and treated purely as data.
- name: Checkout base repo
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Fetch PR head
shell: bash
env:
PR_NUMBER: ${{ steps.mode.outputs.pr_number }}
run: |
set -euo pipefail
# Fetch the PR merge ref — works for both same-repo and fork PRs
# (fork branches don't exist on origin, but pull/<n>/head always does)
git fetch origin "pull/${PR_NUMBER}/head"

- name: Resolve review state
id: state
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/cleanliness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
file-changes:
name: Detect File Changes
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/convergence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ on:
env:
OMPI_MCA_rmaps_base_oversubscribe: 1

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
file-changes:
name: Detect File Changes
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
schedule:
- cron: '0 7 * * *' # daily; loud if the refresh stopped working
workflow_dispatch:
# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
health:
if: github.repository == 'MFlowCode/MFC'
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
file-changes:
name: Detect File Changes
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches: [master]
pull_request:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
build:
name: Build & Verify
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
docs:
name: Formatting
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/fp-stability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,20 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
file-changes:
name: Detect File Changes
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/homebrew-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
type: boolean
default: false

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
update-homebrew-tap:
name: Update homebrew-mfc tap
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- '.github/workflows/homebrew.yml'
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
# Fast smoke tests that run before expensive operations
smoke-test:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
lint-toolchain:
name: Lint Toolchain
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
pmd:
name: PMD
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
run:
name: Spell Check
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-toolchain-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
workflow_dispatch:

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read

jobs:
test-toolchain:
name: "Python ${{ matrix.python-version }}"
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}

# Least-privilege default: no job in this workflow writes to the repo.
permissions:
contents: read
Comment thread
Copilot marked this conversation as resolved.

jobs:
lint-gate:
name: Lint Gate
Expand Down Expand Up @@ -50,6 +54,13 @@ jobs:

file-changes:
name: Detect File Changes
# Job-level permissions replace the workflow default outright rather than
# merging with it, so contents must be restated here. paths-filter reads the
# PR's changed-file list via pulls.listFiles; this is the only job that needs
# it, so it is granted here instead of workflow-wide.
permissions:
contents: read
pull-requests: read
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
Expand Down
Loading