-
Notifications
You must be signed in to change notification settings - Fork 0
fix: don't require GH PAT #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR updates action.yml to support two authentication modes. Inputs are adjusted to remove explicit required flags, and the github-token description clarifies fallback behavior when GitHub App credentials are not provided. New steps generate a GitHub App installation token when app-id and app-private-key are supplied, then choose between the generated token and the provided github-token. Validation ensures either github-token or both app-id and app-private-key are present. Downstream steps (e.g., auto-merge and trunk upgrade) are rewired to consume the derived token from steps.github-token.outputs.token. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
action.yml (2)
54-56: Validation logic is correct; consider early sanity checks for app credentialsThe either/or guard is solid. As a small hardening step, validate common mistakes:
- Ensure app-id is numeric.
- Ensure app-private-key looks like a PEM (starts with "-----BEGIN").
This helps fail fast before hitting token generation.
Example to append after this block:
# Optional: sanity checks when app creds are supplied if [[ -n "${{ inputs.app-id }}" || -n "${{ inputs.app-private-key }}" ]]; then if ! [[ "${{ inputs.app-id }}" =~ ^[0-9]+$ ]]; then echo "::error::app-id must be a numeric GitHub App ID" exit 1 fi if [[ "${{ inputs.app-private-key }}" != *"BEGIN"* "PRIVATE KEY"* ]]; then echo "::error::app-private-key does not look like a PEM key" exit 1 fi fi
96-96: Good choice using GH_TOKEN for gh CLIBinding GH_TOKEN to the resolved token ensures gh works in both modes. Optionally also export GITHUB_TOKEN for tools that look for that variable.
- GH_TOKEN: ${{ steps.github-token.outputs.token }} + GH_TOKEN: ${{ steps.github-token.outputs.token }} + GITHUB_TOKEN: ${{ steps.github-token.outputs.token }}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
action.yml(3 hunks)
🔇 Additional comments (1)
action.yml (1)
7-7: Input doc tweak looks good — optional PAT clearly signaledRemoving the hard requirement and clarifying fallback behavior aligns with the PR goal. No issues spotted.
🤖 I have created a release *beep* *boop* --- ## [0.1.1](v0.1.0...v0.1.1) (2025-09-01) ### Bug Fixes * don't require GH PAT ([#5](#5)) ([0b927a3](0b927a3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: masterpointbot[bot] <177651640+masterpointbot[bot]@users.noreply.github.com>
what
why
references
Summary by CodeRabbit
New Features
Refactor
Documentation