-
Notifications
You must be signed in to change notification settings - Fork 54
chore: create /add-sub-issue
and /remove-sub-issue
commands
#369
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
chore: create /add-sub-issue
and /remove-sub-issue
commands
#369
Conversation
4c95283
to
93a9d94
Compare
/ok-to-test |
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const parseIssueNumber = (input) => { |
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.
It seems hard to maintain this code as a giant string.
Can we move the code to an external JS file under, possibly, .github/scripts
folder and call it here?
At least, we'd have a few IDE capabilities.
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.
I'd prefer to get @thesuperzapper to weigh in on his preferences here... I don't really see the external files pattern used elsewhere in kubeflow
repositories - and don't really want to deviate unless we get an established community member to speak in favor of the change.
I totally appreciate and understand the motivation behind the ask, however!
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.
I think it's fine to leave this inline, as the script is specific to the context of actions/github-script@v7
and there is only one usage of this in the kubeflow org (and even notebooks project) right now.
93a9d94
to
e232d50
Compare
e232d50
to
34e2f9d
Compare
related: kubeflow#325 This new GitHub Actions workflow listens for issue comments and processes commands to add or remove sub-issues using the Javascript client. It includes error handling and posts feedback to the issue for auditability as well as if any errors occur during execution. Acceptable input formats (and multiple space-delimited arguments can be provided): ``` /add-sub-issue #1 /add-sub-issue 1 /add-sub-issue kubeflow#1 ``` :information_source: Be mindful of underlying constraints enforced in GH regarding sub-issues: - An issue can only be a sub-issue to 0 or 1 issues - Trying to add an issue as a sub-issue when it is already assigned as a sub-issue results in error Also, in this commit, the ability to assign sub-issues is open to a set of users defined in the workflow yaml as a JSON string array within the job-level `if` conditional. The current collection identifies all epic owners and technical leaders for Notebooks 2.0. Please note the workflow YAML file has been named generically to potentially house other "slash commands" in the future although the current implementation is only focused on `/add-sub-issue` and `/remove-sub-issue`. Signed-off-by: Andy Stoneberg <[email protected]>
34e2f9d
to
e418374
Compare
/add-sub-issue
and /remove-sub-issue
commands
Thanks, hopefully this solves the problem with permissions to add sub-issues. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thesuperzapper The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
related: #325
This new GitHub Actions workflow listens for issue comments and processes commands to add or remove sub-issues using the Javascript client. It includes error handling and posts feedback to the issue for auditability as well as if any errors occur during execution.
Acceptable input formats (and multiple space-delimited arguments can be provided):
Additionally, the entirety of a comment is scanned/parsed by the GHA - so the following is also valid:
ℹ️ Be mindful of underlying constraints enforced in GH regarding sub-issues:
Also, in this commit, the ability to assign sub-issues is open to a set of users defined in the workflow yaml as a JSON string array within the job-level
if
conditional. The current collection identifies all epic owners and technical leaders for Notebooks 2.0.Please note the workflow YAML file has been named generically to potentially house other "slash commands" in the future although the current implementation is only focused on
/add-sub-issue
and/remove-sub-issue
.To "see" the code in action and test it out - you can see this issue here on a personal repo of mine I was using to test/construct the code: