Fix CodeQL triggers to run on default branch - #8
Conversation
Co-authored-by: mo74m3ed <71875716+mo74m3ed@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions CodeQL workflow triggers so code scanning runs on this repository’s active branches (not just a hard-coded main branch), restoring expected scanning on pushes and pull requests.
Changes:
- Removed the
branches: [ "main" ]filters frompushandpull_requesttriggers in the CodeQL workflow. - Kept the scheduled CodeQL scan unchanged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '44 22 * * 5' |
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
The CodeQL workflow was restricted to target the
mainbranch, which is absent in this repository wherecopilot/mo74m3ed-resolve-issueserves as the primary base branch. Consequently, the workflow failed to trigger on pushes or pull requests to the active development branches.Workflow Trigger Cleanup
mainbranch filter under thepushandpull_requestevent blocks. This allows the CodeQL scanner to execute on any active default or development branch in this repository.Trigger Block Diff