Skip to content

Commit 17ef26f

Browse files
chore: Give fork PRs a clear create-vsix failure message (#1770)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent cec647d commit 17ef26f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/create-vsix.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'create-vsix')
1414
steps:
15+
# GitHub withholds repository secrets from fork-triggered runs, so fail fast with a clear message
16+
- name: Reject fork PRs
17+
if: github.event.pull_request.head.repo.fork
18+
run: |
19+
echo "::error::Could not build a .vsix because fork PRs can't access the required secrets. Ask a maintainer to dispatch it manually for PR #${{ github.event.pull_request.number }}: https://github.com/${{ github.repository }}/actions/workflows/create-vsix.yml"
20+
exit 1
1521
# Get a bot token so the bot's name shows up on all our actions
1622
- name: Get Token From roku-ci-token Application
1723
uses: tibdex/github-app-token@v1

0 commit comments

Comments
 (0)