-
Notifications
You must be signed in to change notification settings - Fork 47
Test #557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test #557
Changes from all commits
1f74744
04c9089
bed0836
a27d3a8
c99601e
35a6de2
1ad3d5b
179747e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Check PR | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| has_changelog: | ||
| description: 'Whether the PR body contains a changelog section' | ||
| value: ${{ jobs.check.outputs.has_changelog }} | ||
| changelog: | ||
| description: 'Extracted changelog text from the PR body' | ||
| value: ${{ jobs.check.outputs.changelog }} | ||
|
|
||
| jobs: | ||
| check: | ||
| name: PR Description Check | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' | ||
| outputs: | ||
| has_changelog: ${{ steps.validate.outputs.has_changelog }} | ||
| changelog: ${{ steps.validate.outputs.changelog }} | ||
|
|
||
| steps: | ||
| - name: Check if Submit on merge label is present | ||
| id: check-label | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const labels = context.payload.pull_request.labels || [] | ||
| const hasSubmitLabel = labels.some(label => label.name === 'Submit on merge') | ||
| core.setOutput('require_changelog', hasSubmitLabel ? 'true' : 'false') | ||
|
|
||
| - name: Checkout tooling | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: niekert/plugins | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded personal fork instead of organization repositoryHigh Severity Both Additional Locations (1) |
||
| path: tooling | ||
| sparse-checkout: scripts | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Validate PR body | ||
| id: validate | ||
| working-directory: tooling | ||
| run: npx tsx@4.21.0 scripts/validate-pr-body.ts | ||
| env: | ||
| PR_BODY: ${{ github.event.pull_request.body }} | ||
| REQUIRE_CHANGELOG: ${{ steps.check-label.outputs.require_changelog }} | ||
|
|
||
| - name: Add Submit on merge label | ||
| if: >- | ||
| steps.validate.outputs.has_changelog == 'true' && | ||
| (github.event.action == 'opened' || github.event.action == 'ready_for_review') | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| labels: ['Submit on merge'] | ||
| }) | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed label breaks auto-submit-on-merge trigger
High Severity
The new
check-pr.ymlchecks for and auto-applies the label'Submit on merge', but the existingsubmit-on-merge.ymlworkflow triggers only when the label'Auto submit to Marketplace on merge'is present. This label name mismatch means auto-labeled PRs will never trigger the submission workflow on merge, silently breaking the auto-publish pipeline.Additional Locations (1)
.github/workflows/check-pr.yml#L62-L63