Skip to content

Document GITHUB_TOKEN settings - Cypress Cloud recording #1273

Open

Description

@MikeMcC399

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

Activity

  1. self-assigned this
    on Oct 3, 2024
  2. MikeMcC399 commented on Oct 4, 2024

    @MikeMcC399
    CollaboratorAuthor

    @tbiethman

    • Can you provide any assistance on this? It's a result of feat: [CYCLOUD-1447] Auto-detect PR numbers #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.
  3. changed the title [-]Document `GITHUB_TOKEN` settings[/-] [+]Document `GITHUB_TOKEN` settings - Cypress Cloud recording[/+] on Oct 4, 2024
  4. removed their assignment
    on Oct 4, 2024
  5. MikeMcC399 commented on Oct 21, 2024

    @MikeMcC399
    CollaboratorAuthor

    This is a topic for the Cypress Cloud team.

  6. VolodymyrSmahliuk commented on Jan 16, 2025

    @VolodymyrSmahliuk

    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 (#1272 (comment)). I applied that on my system to run the Cypress Job on GitHub Actions. Please, consider it when writing the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions