You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out the /app or /installation both uses JWT authentication rather
than installation token. As such we cannot detect the app slug from
inside the workflow, but delegate to the parent workflow. Added
documentation for this use case
**Note**: The `app-slug` parameter enables the bot to detect when it's mentioned in PR comments (e.g., `@my-code-review-app`). Requires `actions/create-github-app-token@v1.9.0` or later.
99
+
54
100
## Security Considerations
55
101
56
102
This action is not hardened against prompt injection attacks and should only be used to review trusted PRs. We recommend [configuring your repository](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#controlling-changes-from-forks-to-workflows-in-public-repositories) to use the "Require approval for all external contributors" option to ensure workflows only run after a maintainer has reviewed the PR.
@@ -79,6 +125,7 @@ This action is not hardened against prompt injection attacks and should only be
79
125
| `custom-security-scan-instructions` | Path to custom security scan instructions text file to append to the security section | None | No |
80
126
| `dismiss-stale-reviews` | Dismiss previous bot reviews when posting a new review (useful for follow-up commits) | `true` | No |
81
127
| `skip-draft-prs` | Skip code review on draft pull requests | `true` | No |
128
+
| `app-slug` | GitHub App slug for bot mention detection. If using `actions/create-github-app-token@v1.9.0+`, pass `${{ steps.app-token.outputs.app-slug }}`. Otherwise defaults to `github-actions`. | `github-actions` | No |
82
129
| `require-label` | Only run review if this label is present. Leave empty to review all PRs. Add `labeled` to your workflow `pull_request` types to trigger on label addition. | None | No |
Copy file name to clipboardExpand all lines: action.yml
+10-44Lines changed: 10 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,11 @@ inputs:
59
59
required: false
60
60
default: 'true'
61
61
62
+
app-slug:
63
+
description: 'GitHub App slug for bot mentions (e.g., "my-code-review-app"). Defaults to "github-actions".'
64
+
required: false
65
+
default: 'github-actions'
66
+
62
67
require-label:
63
68
description: 'Only run review if this label is present on the PR. Leave empty to review all PRs. To trigger on label addition, add "labeled" to your workflow pull_request types.'
0 commit comments