Sample - GitHub REST API
GET/repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval

Get fork PR contributor approval permissions for a repository

Gets the fork PR contributor approval policy for a repository.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.

2 status codes
200Response
approval_policystringrequired
The policy that controls when fork PR workflows require approval from a maintainer.
Allowed:first_time_contributors_new_to_githubfirst_time_contributorsall_external_contributors
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.