Skip to content

Why is GITHUB_BASE_REF and GITHUB_HEAD_REF set for PRs in non-forked repositories? #673

@deanmalan

Description

@deanmalan

What article on docs.github.com is affected?

https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables

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

The documentation for GITHUB_BASE_REF and GITHUB_HEAD_REF says that they're both "only set for forked repositories". However, when I create a create a pull request in a repository that is not forked, they are set to the base branch and branch to be merged in, respectively. See an example here.

Is this expected behaviour? If yes, should the docs not be updated to reflect this?

screenshot

Metadata

Metadata

Assignees

Labels

actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamecosystemThis issue or pull request should be reviewed by the Docs Ecosystem team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions