Problem
Previously filled out JUNIE_API_TOKEN can be missed during pull requests from forks.
The User may see the following error when running the Junie Code Review workflow in Junie CLI:
Error: Prepare step failed with error: Missing required input: JUNIE_API_TOKEN
Error: Process completed with exit code 1.
Cause
This happens when the workflow is triggered by a Pull Request from a forked repository.
By design, GitHub does not pass repository secrets to workflows triggered from forks in GitHub Actions. This is a security measure to prevent secrets (API keys, tokens, credentials) from being exposed to potentially untrusted contributors. As a result, the workflow cannot accessJUNIE_API_TOKEN, and the job fails. More details regarding this behavior can be found here:
- GitHub Actions: Security Hardening for Secrets
- GitHub Actions: Usage limits, billing, and administrative settings
Resolution
To resolve it, the User can:
- Run the workflow from a branch inside the main repository
- Ask a maintainer to trigger or re-run the workflow
- Push the contributor’s changes to a temporary branch in the base repository
Comments
0 comments
Please sign in to leave a comment.