Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint PR Title

on:
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing job permissions

This workflow generates an app installation token but the job doesn’t declare any permissions. On repositories/orgs with default workflow permissions set to read-only, actions/create-github-app-token@v1 can fail because it needs to create an installation access token via the API. Add explicit minimal permissions (e.g. permissions: { contents: read } is usually enough for token generation; if it still fails, grant pull-requests: read too) so this job is reliable across repos.

pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.SDK_BOT_APP_ID }}
private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }}

- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
Loading