Skip to content

Commit 5ef3b68

Browse files
kaovilaiclaude
andcommitted
fix: Skip CodeQL scanning on forked repositories
The CodeQL workflow requires security-events write permission and access to internal GitHub registries/packs that aren't available in forks. Adding a condition to only run on the main repository prevents workflow failures in forked repositories. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1832210 commit 5ef3b68

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/code-scanning.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ env:
1414
jobs:
1515
analyze:
1616
name: Analyze (${{ matrix.language }})
17+
# Only run on the main repository, not on forks
18+
if: github.repository == 'github/github-mcp-server'
1719
runs-on: ${{ fromJSON(matrix.runner) }}
1820
permissions:
1921
actions: read

0 commit comments

Comments
 (0)