-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(actions): add GitHub App authentication support for review actions #7228
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
base: main
Are you sure you want to change the base?
Conversation
- Add optional GitHub App integration for bot identity - Add `use_github_app` input parameter (defaults to true) - Generate app tokens when configured for branded bot identity - Provide fallback to standard GitHub Actions token - Update documentation with setup instructions and benefits - Add troubleshooting guide for app configuration issues
6f973aa
to
4e5e4fe
Compare
- Add issues: write permission for comment handling - Add actions: read for workflow access - Add checks: write for status updates - Revert to bdougie/continue-agent branch for active development Related to continuedev/continue#7228
…issue The bdougie/continue-agent branch has an issue where it tries to access secrets directly in action.yml which isn't allowed. Switching to main branch until continuedev/continue#7228 is merged.
Maintaining reference to development branch where the Continue action is being actively developed. The secrets access issue will be fixed in continuedev/continue#7228
- Remove use_github_app complexity from general-review action - Add github-token as optional input to both actions - Allow token generation to be handled by workflow instead of action - Simplify token logic to use provided token or default to github.token This allows users to generate GitHub App tokens in their workflows and pass them to the actions, providing more flexibility.
- Base action now generates GitHub App token internally - Uses Continue's app credentials (vars.CONTINUE_APP_ID and secrets.CONTINUE_APP_PRIVATE_KEY) - Users only need to provide CONTINUE_API_KEY - Simplifies setup - no GitHub App configuration needed by users
- Simplified workflow to match what external users would use - Shows minimal setup with just CONTINUE_API_KEY - Includes proper permissions for GitHub App operations - Demonstrates the zero-config approach for AI code reviews
- Composite actions cannot access repository vars/secrets directly - Changed to accept app-id and app-private-key as inputs - Defaults app-id to Continue Agent App ID (1090372) - Falls back to github.token if no app credentials provided - Added examples showing both basic and GitHub App usage
- Both app-id and app-private-key are now passed as secrets - Removed default app-id value - Updated test workflow to use proper secret names - Users need to set CONTINUE_APP_ID and CONTINUE_APP_PRIVATE_KEY in their repo secrets
Related Documentation No published documentation to review for changes on this repository. |
- Added continue-on-error to GitHub App token generation - Made app-id and app-private-key truly optional in workflow - Action will use GitHub App token if available, otherwise falls back to github.token - Prevents 'Not Found' error when app is not installed on repository - Simplifies setup for users who don't have the GitHub App installed
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.
This PR introduces GitHub App authentication support for Continue's code review actions and adds a new base-review action for zero-config setup. The implementation is solid but has several areas that need attention, particularly around error handling, security practices, and script robustness.
💡 To request a new detailed review, comment @continue-detailed-review
💡 To request a new review, comment |
- Automatically posts a comment if GitHub App token generation fails - Provides clear instructions on how to install the Continue Agent app - Explains benefits of using the app vs default token - Helps users understand the setup process - Still allows reviews to work without the app
💡 To request a new review, comment |
- Changed org from 'continue' to 'continuedev' - Changed config from 'continue/default' to 'continuedev/clean-code' - Uses the clean code review configuration for better code analysis
- Changed config from 'continuedev/clean-code' to 'continuedev/review-bot' - Uses the dedicated review bot configuration
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.
This PR introduces a GitHub App integration for Continue Agent reviews and adds a new base-review action for zero-config setup. While the implementation is generally good, there are several areas that need attention: security improvements for error handling, consistency in naming conventions, better user guidance, and some potential edge cases in the review logic.
💡 To request a new detailed review, comment @continue-detailed-review
- Added github-token as optional input parameter - Prioritizes passed github-token over generated app token - Allows users to provide their own GitHub App token from workflow - Maintains backward compatibility with existing workflows This enables workflows to generate GitHub App tokens externally and pass them to the action, allowing comments to appear from the GitHub App bot even when the action doesn't have direct access to app credentials.
- Removed use_github_app flag and app credential inputs from all actions - All actions now accept optional github-token parameter - Simplified detailed-review action to match general-review pattern - Base-review action now follows same token priority: passed token > app token > default - Consistent authentication approach across all review actions This allows users to: 1. Use default github.token (comments as github-actions bot) 2. Pass their own GitHub App token (comments as app bot) 3. Let base-review generate app token if credentials provided
Code Review Summary✅ Strengths
|
- All actions now have use_github_app flag (defaults to true) - All actions can fallback to CONTINUE_APP_ID and CONTINUE_APP_PRIVATE_KEY secrets - Default app-id is 1090372 (Continue Agent App ID) - Base-review now uses detailed-review action for all reviews - Token priority: provided token > app token > default token This enables GitHub App authentication by default while allowing fallback to: 1. Repository secrets (CONTINUE_APP_ID, CONTINUE_APP_PRIVATE_KEY) 2. Default GitHub Actions token if app auth fails
- Removed trailing spaces - Standardized comment formatting - Consistent indentation and spacing
- Add continue-org and continue-config as configurable inputs to base-review (defaults maintained) - Add authorization checks to base-review action for security - Add validation for GitHub App credentials (warn if only one provided) - Remove TODO comments from production code - Keep action reference as @main until PR is merged - Improve user permissions validation for both PR and comment events This addresses the main review concerns: - Security: Added permission checks for OWNER/MEMBER/COLLABORATOR - Flexibility: Made base-review configurable while keeping zero-config defaults - Consistency: Better validation and error messages - Code quality: Removed TODO comments
- Re-added TODO comments for action consolidation feature - These represent valid future improvements to track - Will be addressed in a follow-up PR to consolidate actions
✅ Review Comments AddressedThank you for the thorough reviews! I've addressed all the major concerns raised: 🔧 Changes Made:
📊 Summary:The base-review action now provides the best of both worlds:
All three actions (base-review, general-review, detailed-review) now follow consistent patterns for authentication and configuration, making the codebase more maintainable. Ready for final review! 🚀 |
- Add if condition to workflow to only run on PRs or @continue-agent mentions - Prevent workflow from running on every issue comment (security fix) - Implement secure handling of custom prompts after @continue-agent - Sanitize input by using temp files and treating as data, not code - Support custom review instructions: '@continue-agent focus on security' - Add example usage documentation This addresses the security concern about exposing secrets on every comment while adding support for custom review prompts in a secure way.
- Quote all GITHUB_OUTPUT and GITHUB_ENV variables - Prevents potential word splitting issues in shell scripts - Follows shell scripting best practices for variable quoting - Improves script robustness and security
- Add comprehensive documentation for base-review action - Include zero-config setup examples - Add custom review prompt examples with @continue-agent - Document security features and multi-layer protection - Remove test workflow and standalone example file - Consolidate all documentation in actions/README.md
- Format YAML and Markdown files with prettier - Fix trailing spaces and consistent formatting - Align table columns in README - Ensure consistent line breaks and spacing
* feat: Add Continue Agent for AI-powered code reviews (#458) - Adds GitHub Actions workflow for automated AI code reviews - Triggers on PR open, sync, and ready_for_review events - Supports manual trigger via issue comments (@continue-agent review) - Uses Continue's base-review action for streamlined setup 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: Update Continue Agent action to use bdougie/continue-agent branch and GitHub App auth * fix: Update permissions and revert to bdougie/continue-agent branch - Add issues: write permission for comment handling - Add actions: read for workflow access - Add checks: write for status updates - Revert to bdougie/continue-agent branch for active development Related to continuedev/continue#7228 * fix: Temporarily use main branch until PR #7228 fixes secrets access issue The bdougie/continue-agent branch has an issue where it tries to access secrets directly in action.yml which isn't allowed. Switching to main branch until continuedev/continue#7228 is merged. * fix: Keep bdougie/continue-agent branch reference Maintaining reference to development branch where the Continue action is being actively developed. The secrets access issue will be fixed in continuedev/continue#7228 * fix: Remove use_github_app flag from Continue action config * feat: Add GitHub App token generation for authenticated comments - Generate GitHub App token before running Continue action - Pass token to Continue action for authenticated API calls - Comments will now appear from the GitHub App instead of Actions bot * fix: Remove github-token parameter that's not accepted by Continue action The Continue base-review action doesn't have a github-token input defined, so passing it was causing the workflow to fail. Removed the GitHub App token generation step and the github-token parameter. * fix: Simplify Continue workflow - action handles GitHub App internally The Continue base-review action now handles GitHub App token generation internally using Continue's centralized app credentials. Users only need to provide CONTINUE_API_KEY, making the setup much simpler. Removed: - Manual GitHub App token generation step - APP_ID and APP_PRIVATE_KEY secrets requirement - github-token parameter passing - Unnecessary permissions block The action will automatically post reviews as the Continue Agent bot. * feat: Add workflow_dispatch and update triggers/permissions - Removed 'synchronize' trigger to reduce unnecessary runs - Added workflow_dispatch for manual testing - Added explicit permissions for security best practices * feat: Use Continue App credentials for GitHub App authentication Now using CONTINUE_APP_ID and CONTINUE_APP_PRIVATE_KEY to generate a GitHub App token that's passed to the Continue action. This enables comments to be posted as the Continue Agent app instead of github-actions[bot]. Required secrets: - CONTINUE_API_KEY: Continue service API key - CONTINUE_APP_ID: Continue's GitHub App ID - CONTINUE_APP_PRIVATE_KEY: Continue's GitHub App private key * feat: Add synchronize trigger to Continue workflow Workflow now runs on: - opened: when PR is created - synchronize: when new commits are pushed to PR - ready_for_review: when draft PR is marked ready * chore: Pin Continue action to main branch Changed from bdougie/continue-agent to main branch. Added TODO to pin to specific SHA after Continue merges GitHub App token support. --------- Co-authored-by: Claude <[email protected]>
Description
This PR enhances the Continue review actions to support GitHub App authentication, enabling reviews to be posted as the Continue Agent bot instead of the github-actions bot. This provides a better user experience with proper bot identity and improved rate limits.
Key Changes:
Standardized GitHub App Authentication: All three review actions (base-review, general-review, detailed-review) now support GitHub App authentication by default with
use_github_app: true
.Flexible Token System: Introduced a
github-token
input parameter that allows external workflows to pass their own GitHub App tokens, enabling full control over authentication. This was only because I could not test it locally without it being installed. I installed it on my bdougie/contributor.info#459 repo to test. cc @sestinj for installing https://github.com/apps/continue-agentSmart Fallback Chain:
Simplified Base Action: The base-review action now delegates to detailed-review, eliminating duplicate code and ensuring consistent behavior. IMO - detailed review has all the value.
Zero-Config for External Users: External repositories can use the action with just
CONTINUE_API_KEY
.Enhanced Security Features: - _Suggest in the review because I ran prettier on the existing code. @tomasz-stefaniak _
@continue-agent
is mentionedCustom Review Prompts: Users can now provide specific instructions:
@continue-agent
- Standard review@continue-agent detailed
- Detailed review@continue-agent focus on security
- Custom focus areaAuthentication Flow:
Security Improvements:
Benefits:
continue-agent[bot]
instead ofgithub-actions[bot]
AI Code Review
@continue-general-review
or@continue-detailed-review
, however this would be cleaner as a webhook in the future.Checklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
The main goal was allowing the app to comment instead of GitHub. The other changes were clean from the reviews.
Now use the GitHub App logo to comment.
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
.github/workflows/test-continue-agent.yml is the test and will be deleted once confirmed working. We first need to add the CONTINUE_APP_PRIVATE_KEY & CONTINUE_APP_ID
Summary by cubic
Adds GitHub App authentication to the review actions so reviews post as continue-agent[bot] with better rate limits and short‑lived tokens. Defaults to the app and falls back to the standard Actions token if not configured.
New Features
Migration