docs icon indicating copy to clipboard operation
docs copied to clipboard

PowerShell code is hidden when using anchors, as pwsh tab at the top is bypassed / Add tab to code itself instead of page

Open potatoqualitee opened this issue 3 years ago • 0 comments

Code of Conduct

What article on docs.github.com is affected?

workflow-commands-for-github-actions.md

What changes are you suggesting?

I recently had to update my Actions to comply with the new $GITHUB_OUTPUT requirement. It took me forever to figure out that in PowerShell, it is $env:GITHUB_OUTPUT.

Your blog post, GitHub Actions: Deprecating save-state and set-output commands, only listed shell commands. So I followed the provided link to an anchor on the docs site at Workflow commands for GitHub Actions to see how to do it in PowerShell.

It was only shell. It took me about 30 minutes to figure out that I needed to use $env:GITHUB_OUTPUT and I wanted to save other people time, so I ended up cloning the docs site to add the PowerShell info under the shell code blocks.

When I opened up VS Code to add the PowerShell code, I saw PowerShell was already there. What? So I went back to the page and did a Ctrl-F to find where PowerShell was mentioned and it was way at the top.

image

As I was writing this issue, it occurred to me that for clarity's sake, the PowerShell code would have been better placed right under the shell code, or my preference, as a tab within the code block itself like Microsoft docs. The tab at the top is neat (I like how it makes the whole page about PowerShell) and pretty but does not function as well as other alternatives when anchors are used.

Additional information

Can you please also update the blog post (GitHub Actions: Deprecating save-state and set-output commands) to mention pwsh?

potatoqualitee avatar Oct 20 '22 08:10 potatoqualitee