Skip to content

/forks should document the github apps limitations #43841

@xmo-odoo

Description

@xmo-odoo

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/repos/forks#create-a-fork

What part(s) of the article would you like to see updated?

POST /repos/{owner}/{repo}/forks is currently documented as

This endpoint works with the following fine-grained token types:

GitHub App user access tokens
GitHub App installation access tokens
Fine-grained personal access tokens

There is no hint or indication that none of these work when forking between private repositories of different organizations.

Furthermore the feedback received when attempting this operation using GHA tokens are of an extreme level of unhelpfulness: given a GHA installed in both organizations A and B as well as a user account which has admin access to both, trying to fork a private repository A.r into B

  • Using the installation access token (IAT) for A, the fork returns a success, but the organization field is ignored and it creates the fork into A.
  • Using the IAT for B, the fork fails with a 404 (this makes some sense, although the feedback is unhelpful).
  • Using the user access token for the user, the fork returns a 403 with the error message "resource not accessible by integration".

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions