Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote language versions in YAML examples #14764

Open
1 task done
skedwards88 opened this issue Jan 28, 2022 · 4 comments · Fixed by #16167
Open
1 task done

Quote language versions in YAML examples #14764

skedwards88 opened this issue Jan 28, 2022 · 4 comments · Fixed by #16167
Labels
actions content help wanted

Comments

@skedwards88
Copy link
Contributor

@skedwards88 skedwards88 commented Jan 28, 2022

Code of Conduct

What article on docs.github.com is affected?

YAML examples in https://docs.github.com/actions

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

YAML treats floats like 2.10 as 2.1. This can lead to workflows using a different language version than intended. We should update the YAML examples to quote language versions to avoid this. To help users who copy-paste-modify without understanding the nuance, we should quote all language versions, even ones that would not be affected by this parsing.

For example:

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]

should be changed to

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.6", "3.7", "3.8", "3.9"]

Then if a user copies the example but wants to include version 3.10, they can easily plug in the new value without knowing they need to add quotes.

Additional information

No response

@skedwards88 skedwards88 added help wanted content actions labels Jan 28, 2022
@docubot docubot added this to Help wanted in Docs open source board Jan 28, 2022
@github-actions github-actions bot added the triage label Jan 28, 2022
@bee-Michi
Copy link

@bee-Michi bee-Michi commented Jan 29, 2022

Hi! Where can i find the code to edit, so i can send a pr?

@bee-Michi
Copy link

@bee-Michi bee-Michi commented Jan 29, 2022

Or if there's no code to edit and I'm stupid, please let me know!

@Moloko122

This comment has been minimized.

@ramyaparimi ramyaparimi removed the triage label Jan 31, 2022
Docs open source board automation moved this from Help wanted to Done Mar 11, 2022
@skedwards88
Copy link
Contributor Author

@skedwards88 skedwards88 commented Mar 11, 2022

Reopening this since some but not all examples have been addressed. Others are welcome to open PRs to partially address this issue as well!

@skedwards88 skedwards88 reopened this Mar 11, 2022
@github-actions github-actions bot added the triage label Mar 11, 2022
@ramyaparimi ramyaparimi removed the triage label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions content help wanted
Development

Successfully merging a pull request may close this issue.

6 participants
@skedwards88 @ramyaparimi @bee-Michi @Moloko122 and others