docs icon indicating copy to clipboard operation
docs copied to clipboard

permissions: read-all|write-all does not work as an example

Open logankilpatrick opened this issue 2 years ago • 5 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

What changes are you suggesting?

The current example makes it seem like you can set the permissions to be both read and write but that shows an YAML error when you do so. I look but could not find the code for this section of the docs but it should be updated so people don't mistakenly try this.

Additional information

No response

logankilpatrick avatar Dec 18 '22 17:12 logankilpatrick

@logankilpatrick Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Dec 19 '22 22:12 cmwilson21

Thanks for opening this issue!

Most people should be able to recognize the meaning of the example, but I do agree that for less-experienced people we should be more explicit.

We could modify the preceding para to instead state:

You can use the following syntax to choose one of `read-all` or `write-all` access for all of the available scopes:

Similarly, for the earlier example showing all scopes, we should change

Available scopes and access values:

to

Shown below are the available scopes and access values. You can choose an access value as one of `read`, `write`, or `none`. 

You, or anyone else, are free to open a PR to fix.

Thanks!

lucascosti avatar Jan 17 '23 22:01 lucascosti

Would be happy to pick this up. Let me know if you can assign this to me?

codewithdev avatar Mar 31 '23 01:03 codewithdev

👋 @codewithdev - Thanks for your interest in this one. We don't assign issues, but feel free to submit a PR!

cmwilson21 avatar Mar 31 '23 20:03 cmwilson21

Most people should be able to recognize the meaning of the example, but I do agree that for less-experienced people we should be more explicit.

A 10-year experience engineer here and I disagree. The docs explicitly say:

You can use the following syntax to define read or write access for all of the available scopes: permissions: read-all|write-all

If I see such a statement I presume that copy-pasting should work. I suggest rephrasing this section and providing clear examples instead.

raymank26 avatar Jun 11 '23 21:06 raymank26

I've updated the issue body with the suggested fix for the original issue. It looks as if the secondary suggestion discussed in this issue has already been made clearer.

felicitymay avatar Sep 19 '23 13:09 felicitymay

permissions: read-all|write-all doesn't work?!

what todo?

theaddonn avatar Dec 31 '23 13:12 theaddonn