docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix wrong info for defaults.run

Open j1elo opened this issue 2 years ago • 4 comments

Why:

Closes https://github.com/github/docs/issues/23465

What's being changed (if available, include any code snippets, screenshots, or gifs):

  1. Text mentioned a nonexistent key jobs.defaults.run.

  2. Text said that "You cannot use contexts or expressions in this keyword.", however the Context availability docs state that jobs.<job_id>.defaults.run should be able to access a variety of contexts. Empirically tested and the runner does in fact not fail when using the inputs context within a jobs.<job_id>.defaults.run entry.

  3. Removed extra repeated sentence after the link to defaults.run, leaving the context support of that key to be documented in that section.

Check off the following:

  • [ ] 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).
  • [ ] For content changes, I have completed the self-review checklist.

j1elo avatar Jan 24 '23 17:01 j1elo

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 Jan 24 '23 17:01 welcome[bot]

Only task remaining to be able to check off the requested checkboxes is to review the new contents in staging, but I do not know where I can find staging, it says to look for the "Automatically generated comment", but the only one is https://github.com/github/docs/pull/23466#issuecomment-1402332579 and it doesn't mention anything about staging so I'm a bit lost at this point.

j1elo avatar Jan 25 '23 09:01 j1elo

@j1elo Thanks for submitting a PR and linking it to your issue ✨

Since this is a reusable, the automatically generated comment won't trigger. You can always run your branch locally to check for changes, but no worries on that for this content change as it won't hinder the review process to leave that box unchecked. I'll get it triaged for review! ⚡

cmwilson21 avatar Jan 25 '23 16:01 cmwilson21

👋 @j1elo Just wanted to check in and see if you've had a chance to link your workflow run logs as requested here. Feel free to ping me when you have! ✨

cmwilson21 avatar Jun 12 '23 20:06 cmwilson21

I tested using a context:

jobs:
  dump_contexts_to_log:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: ${{ env.myshell }}

and an expression:

jobs:
  dump_contexts_to_log:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: ${{ format('ba{0}{1}', 's', 'h') }}

both of these work fine.

https://github.com/codspaces/hubwriter-javascript-action/blob/main/.github/workflows/context-test.yml

On the strength of this I think we're good to merge this PR.

hubwriter avatar Sep 15 '23 11:09 hubwriter

@j1elo - Many thanks for raising this PR, and the issue for it. 👍

I'm going to get this merged. 🚀

hubwriter avatar Sep 15 '23 11:09 hubwriter

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 Sep 15 '23 11:09 github-actions[bot]