-
Notifications
You must be signed in to change notification settings - Fork 3.6k
CI: simplify groups ref/pointer #15559
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
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.
This will be very nice if it works!
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.
Blocking until I verify if this works! Thanks for the suggestion
in theory, it should, as it is using YAML native directive/syntax BUT it seems that with this, the referred lists are loaded as sublists, so not expanded as a single flattened list :( import yaml
from rich import print
with open(".github/checkgroup.yml") as fh:
config = yaml.safe_load(fh)
print(config) |
I checked and we use https://probot.github.io/api/7.0.1/classes/context.html#config to load the configuration file. There's no mention of any specific parsing constraints so I assume it will work just as Looking at https://stackoverflow.com/questions/24090177/how-to-merge-yaml-arrays, it looks like flattening these list is not possible. The only solution I can think of is adding support for flattening in the javascript implementation of checkgroup so that we can use this notation: https://github.com/Lightning-AI/probot/blob/babecd77266ed8ac540de7f5e17804030174215c/src/check-group/utils/user_config_parser/populate_subprojects.ts#L63-L91 |
Let's keep it simple, personally, it may be good to be by default flatten all lists in check and paths as there is no meaning for a tree, but if it is not a few clicks away, let's drop it for now 🐰 |
What does this PR do?
reduce duplicated sections which are sensitive for human error and improve readability
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃