Skip to content

Commit cfad948

Browse files
committed
Revert mypy_primer_comment.yml changes
1 parent 45cdb40 commit cfad948

File tree

4 files changed

+16
-28
lines changed

4 files changed

+16
-28
lines changed

.github/workflows/mypy_primer.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,3 @@ jobs:
9999
name: mypy_primer_diffs
100100
pattern: mypy_primer_diffs-*
101101
delete-merged: true
102-
103-
call_comment_workflow:
104-
name: Call mypy_primer_comment workflow
105-
needs: [join_artifacts]
106-
permissions:
107-
contents: read
108-
pull-requests: write
109-
uses: ./.github/workflows/reusable_mypy_primer_comment.yml
110-
with:
111-
workflow_id: ${{ github.run_id }}

.github/workflows/reusable_mypy_primer_comment.yml renamed to .github/workflows/mypy_primer_comment.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
name: Comment with mypy_primer diff
22

3-
on:
4-
workflow_call:
5-
inputs:
6-
workflow_id:
7-
required: true
8-
type: string
9-
10-
permissions:
11-
contents: read
12-
pull-requests: write
3+
on: # zizmor: ignore[dangerous-triggers]
4+
workflow_run:
5+
workflows:
6+
- Run mypy_primer
7+
types:
8+
- completed
139

1410
jobs:
1511
comment:
1612
name: Comment PR from mypy_primer
1713
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1818
steps:
1919
- name: Download diffs
2020
uses: actions/github-script@v7
21-
env:
22-
WORKFLOW_ID: ${{ inputs.workflow_id }}
2321
with:
2422
script: |
2523
const fs = require('fs');
2624
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
2725
owner: context.repo.owner,
2826
repo: context.repo.repo,
29-
run_id: process.env.WORKFLOW_ID,
27+
run_id: ${{ github.event.workflow_run.id }},
3028
});
3129
const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>
3230
artifact.name == "mypy_primer_diffs");

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ repos:
1111
- id: black
1212
exclude: '^(test-data/)'
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.8.4
14+
rev: v0.8.6
1515
hooks:
1616
- id: ruff
1717
args: [--exit-non-zero-on-fix]
1818
- repo: https://github.com/python-jsonschema/check-jsonschema
19-
rev: 0.30.0
19+
rev: 0.31.0
2020
hooks:
2121
- id: check-github-workflows
2222
- id: check-github-actions
2323
- id: check-readthedocs
2424
- repo: https://github.com/rhysd/actionlint
25-
rev: v1.7.4
25+
rev: v1.7.6
2626
hooks:
2727
- id: actionlint
2828
args: [
@@ -36,7 +36,7 @@ repos:
3636
# but the integration only works if shellcheck is installed
3737
- "github.com/wasilibs/go-shellcheck/cmd/[email protected]"
3838
- repo: https://github.com/woodruffw/zizmor-pre-commit
39-
rev: v1.0.0
39+
rev: v1.0.1
4040
hooks:
4141
- id: zizmor
4242
# Should be the last one:

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ branding:
3232
runs:
3333
using: composite
3434
steps:
35-
- name: mypy setup
35+
- name: mypy setup # zizmor: ignore[template-injection]
3636
shell: bash
3737
run: |
3838
echo ::group::Installing mypy...

0 commit comments

Comments
 (0)