-
Notifications
You must be signed in to change notification settings - Fork 61.9k
Actions: Indicate that .steps is an array of objects #1385
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
Conversation
@Simran-B Thanks so much for opening a PR! I'll get this triaged for review 🌟 |
This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit. |
Thanks for your patience @Simran-B! Our small team is working our way through reviewing all of the amazing contributions ✨ |
No pressure, I'm in a very similar position myself, so I can totally relate. BTW. I edited my initial post: |
(Just for information: I updated this PR from |
This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit. |
Thanks a lot for this PR, @Simran-B! Sorry it's taken us a while to respond. IIUC, there's no standard specification for referring to a path for a yaml key (please correct me if I'm wrong! 🙂 )
🤔 Yep, I agree with this. I think I would prefer using I will raise this in our team meeting this week to see if there's consensus in the team on what we should use. Stay tuned, I'll come back with an answer! |
Correct, there is not a single standard and both JSONPath and jq are about JSON, not YAML. On the other hand, YAML is a superset of JSON, so it's not too far off. I like the idea of using |
We discussed it internally, and we decided that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks soooo much, @Simran-B for this marvelous work! 🙇♂️ This will help people understand the syntax a lot better than the misleading paths we have at the moment!
This looks great, so I'll merge it in! 🚢
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. |
Thanks @lucascosti!
It struck me this morning that I didn't check whether it would break existing anchor links. Great to hear that it doesn't! Is there a policy how to handle cases where links do get broken? Should one add On another related note, is it worth to look into avoiding trailing hyphens in anchor slugs? There are a few pages with headlines like: ## GitHub Docs <!-- omit in toc --> The space between title and comment is not stripped away by the slugger it seems, and the anchor link ends up being
So if I were to change this, I would keep the space and instead adjust the slugger behavior. To not break existing anchor links, I would make it: <a name="github-docs-"></a>
## GitHub Docs <!-- omit in toc --> There are only 11 instances of |
For renaming an entire article, we update all URLs to it in the repo and then set up a redirect for the old URL. However, for in-page section anchors, we generally don't insert manual anchors (like
Nice spotting! Feel free to open a PR if you want to update them and remove the space, but I don't think it's too important. If you were to update them, I'd just remove the space and not worry about adding a manual anchor. |
Why:
The headlines for job steps like
jobs.<job_id>.steps.name
imply the following YAML:However,
steps
is actually an array of objects (note the hyphen):This should be indicated, e.g. like
jobs.<job_id>.steps.*.name
.What's being changed:
Use
.*
to reflect thatsteps
is an array. This is consistent with Object filters. It could be misinterpreted as shown below however:Alternative ways to express it that come to mind:
steps[*].name
(JSONPath style)steps[].name
(jq style)Also fix angled bracket in headlinealready fixed by #1456outputs.<output_id.value>
.Check off the following: