Skip to content

Fix lint job failure on push events due to missing PR - #1

Draft
fbastian with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-lint-tool-list-job
Draft

Fix lint job failure on push events due to missing PR#1
fbastian with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-lint-tool-list-job

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown

The lint job in pr.yaml runs on both PR and push-to-main events, but Find Pull Request had failIfNotFound: true — causing the entire job to fail on push events where no associated PR exists.

Changes

  • failIfNotFound: false on the Find Pull Request step so the step succeeds when no PR is found
  • Conditional Get labels of the PR step (if: steps.find-pr.outputs.number != '') to skip the labels fetch when no PR number is available

When no PR is found, env.LABELS stays empty, the label-based skip logic in Conditionally skip URL/version linter evaluates to false, and linting proceeds normally — correct behavior for push events.

The lint job was failing when triggered by a push to main/master because
the Find Pull Request step had failIfNotFound: true. When no PR exists
for the push event, this caused the entire lint job to fail.

Fix:
- Set failIfNotFound: false so the step succeeds when no PR is found
- Make Get labels step conditional on PR number being available
Copilot AI changed the title [WIP] Fix failing GitHub Actions job lint tool-list (3.11) Fix lint job failure on push events due to missing PR Jul 30, 2026
Copilot AI requested a review from fbastian July 30, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants