docs
docs copied to clipboard
Incorrect type of `string` for `github.ref_protected` property
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
What part(s) of the article would you like to see updated?
type for property github.ref_protected is of type string according to the table, but is of type boolean in both the example contents of the github context and actual usage.
The following snippet skips the step on a protected branch:
...
jobs:
debug:
name: Protected check
runs-on: ubuntu-latest
if: github.ref_protected == 'true'
...
The following snippet runs the job on a protected branch:
...
jobs:
debug:
name: Protected check
runs-on: ubuntu-latest
if: github.ref_protected
...
Additional information
No response
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
@chrismuellner Thanks for opening an issue and linking it to your PR! ✨