docs icon indicating copy to clipboard operation
docs copied to clipboard

Specify scope of default environment variables

Open valentin-krasontovitsch opened this issue 2 years ago â€ĸ 3 comments

It is not obvious that default environment variables will not be available in the env context. We add a note to that regard.

Why:

Closes: #24895

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.

valentin-krasontovitsch avatar Apr 05 '23 17:04 valentin-krasontovitsch

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.

welcome[bot] avatar Apr 05 '23 17:04 welcome[bot]

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/learn-github-actions/variables.md fpt
ghec
ghes@ 3.10 3.9 3.8 3.7 3.6
ghae
fpt
ghec
ghes@ 3.10 3.9 3.8 3.7 3.6
ghae

fpt: Free, Pro, Team ghec: GitHub Enterprise Cloud ghes: GitHub Enterprise Server ghae: GitHub AE

github-actions[bot] avatar Apr 05 '23 17:04 github-actions[bot]

@valentin-krasontovitsch Thank you for opening a PR and linking it to your issue! ✨

I'll get this triaged for review! :zap:

cmwilson21 avatar Apr 05 '23 20:04 cmwilson21

four months for a simple, small docs update. I have my own project that I'm woefully neglecting, so I understand this can happen, but that one has just one maintainer, and is free-time based :sweat_smile:

valentin-krasontovitsch avatar Aug 08 '23 13:08 valentin-krasontovitsch

@valentin-krasontovitsch Thanks for checking in on this. It is up on the board for review 👍

We appreciate your patience as we are working through our backlog 💖

cmwilson21 avatar Aug 08 '23 14:08 cmwilson21

Of course, thank you for your response, and godspeed :rainbow:

valentin-krasontovitsch avatar Aug 08 '23 15:08 valentin-krasontovitsch

Hey @valentin-krasontovitsch, thank you so much for your patience with us as we work through our backlog. đŸ™‡â€â™€ī¸

I do see how it would be confusing for users to know how to use default environment variables in workflows with the way the docs are currently written. There is a note underneath the table of default environment variables that says:

Most of the default variables have a corresponding, and similarly named, context property. For example, the value of the GITHUB_REF variable can be read during workflow processing using the ${{ github.ref }} context property.

What do you think of this idea:

We could move that out of the note and into its own paragraph after the first sentence in the introduction. We could also add a sentence before it so that we say something along the lines of:

Because default environment variables are set by GitHub and not defined in a workflow, they are not accessed through the env context. However, most of the default variables have a corresponding, and similarly named, context property. For example, the value of the GITHUB_REF variable can be read during workflow processing using the ${{ github.ref }} context property.

Would that make things more clear in this doc? Let me know! Thank you for helping to improve GitHub's docs! ⚡

SiaraMist avatar Aug 14 '23 23:08 SiaraMist

yes i think that would definitely help! thanks for the much better suggestion : )

should i change this PR to reflect your suggestions, or close this one and leave it to you / somebody else to create a new PR?

valentin-krasontovitsch avatar Aug 16 '23 08:08 valentin-krasontovitsch

That's awesome. 😃 @valentin-krasontovitsch if you want to update this PR, then I can accept your changes and get them merged!

SiaraMist avatar Aug 16 '23 17:08 SiaraMist

it is done ^^

let me know if the new diff is OK, and if the commit message is up to par.

valentin-krasontovitsch avatar Aug 16 '23 19:08 valentin-krasontovitsch

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:

github-actions[bot] avatar Aug 16 '23 20:08 github-actions[bot]