docs
docs copied to clipboard
Use a random delimiter in examples
It was a bit jarring seeing a strong warning about choosing random delimiters, then an example immediately afterwards that didn't follow that advice. This fixes that.
I'm not 100% confident with base64 here. The inclusion of "/" and "+" characters should be fine, but sometimes they are treated specially in ways that might not produce good results.
Also, my powershell isn't that strong, but this seems to do the trick (with slightly lower entropy as I don't include "+" and "/").
FWIW, 120 bits of randomness (or close to that) should be plenty. Using a multiple of three bytes ensures that base64 doesn't add any awkward "=" characters. I'd use hex, but then I'm less confident in the availability of xxd.
Why:
Closes [issue link]
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following:
- [x] I have reviewed my changes in staging (look for the "Automatically generated comment" and click the links in the "Preview" column to view your latest changes).
- [x] For content changes, I have completed the self-review checklist.
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
Automatically generated comment ℹ️
This comment is automatically generated and will be overwritten every time changes are committed to this branch.
The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.
Content directory changes
You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
| Source | Preview | Production | What Changed |
|---|---|---|---|
actions/using-workflows/workflow-commands-for-github-actions.md |
fpt ghec ghes@ 3.8 3.7 3.6 3.5 3.4 ghae |
fpt ghec ghes@ 3.8 3.7 3.6 3.5 3.4 ghae |
fpt: Free, Pro, Team ghec: GitHub Enterprise Cloud ghes: GitHub Enterprise Server ghae: GitHub AE
@martinthomson Thanks so much for opening a PR! I'll get this triaged for review :zap:
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert :eyes:
This is a gentle bump for the docs team that this PR is waiting for technical review.
This is a gentle bump for the docs team that this PR is waiting for technical review.
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues :zap:
A random delimiter doesn't really make sense. This will just make your workflow randomly fail if you're unlucky.
The warning should be fixed instead. It feels like a copy&paste of the earlier warning on this page. Neither random nor unique per run makes sense here. What's important is that the delimiter does not occur in the value.
@soliton- , The random values here are 15 bytes in length. That turns into 20 characters. It's a little tricky to work out the exact odds of a collision, because that depends on what you are delimiting. However, for any given 20 character sequence, the odds that you will produce a collision is 2-120. Sure, with a large file you get many attempts, but even if you have random base64 data, you need to have in the order of 260 bytes before the chance of a collision is meaningful. I don't know about you, but most people won't be including that much data. If you are sending that much data, increase the length of the delimiter by a few bytes.
@martinthomson Normally you pick a delimiter that in principle cannot occur in the values in your specific workflow and you're done. If you absolutely must then pick the delimiter at random but there is no point in picking a different one each run. It just makes this example more complex and will make it all the more confusing if you get an error then and don't even know what the delimiter was.