Document `GITHUB_TOKEN` settings - Cypress Cloud recording
What would you like?
Document the necessary permission settings for GITHUB_TOKEN.
Why is this needed?
As documented in the README Automatic PR number and URL detection, if the GITHUB_TOKEN is set when recording to Cypress Cloud, PR information is extracted.
Restrictive permissions for the GITHUB_TOKEN can however have been set in the enterprise, organization, repository or workflow which may prevent this working.
Other
Related issues
- https://github.com/cypress-io/github-action/issues/1208
@tbiethman
- Can you provide any assistance on this? It's a result of https://github.com/cypress-io/github-action/pull/1009 and I'm not sure that I understand the whole story yet, so I'm trying to reverse engineer it.
- I don't know exactly what circumstances permissions are needed. In a test with all permissions disabled (
permissions: {}) recording was successful. From reports of other users I know that this is not always the case.
This is a topic for the Cypress Cloud team.
Additional permissions should be documented:
permissions:
contents: read # This is required for actions/checkout
pull-requests: read # This is required for Cypress run
actions: write # This is required for Cypress run
I published the detailed fixes in (https://github.com/cypress-io/github-action/issues/1272#issuecomment-2595090790). I applied that on my system to run the Cypress Job on GitHub Actions. Please, consider it when writing the documentation.