docs icon indicating copy to clipboard operation
docs copied to clipboard

Incorrect type of `string` for `github.ref_protected` property

Open chrismuellner opened this issue 3 years ago • 2 comments

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

chrismuellner avatar Sep 07 '22 13:09 chrismuellner

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.

welcome[bot] avatar Sep 07 '22 13:09 welcome[bot]

@chrismuellner Thanks for opening an issue and linking it to your PR! ✨

cmwilson21 avatar Sep 07 '22 14:09 cmwilson21