Skip to content

feat: manage sub-issues through "slash commands" in issue comments #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

Open
wants to merge 1 commit into
base: notebooks-v2
Choose a base branch
from

Conversation

andyatmiami
Copy link

@andyatmiami andyatmiami commented May 21, 2025

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):

/add-sub-issue #1
/add-sub-issue 1
/add-sub-issue https://github.com/kubeflow/notebooks/issues/1

Additionally, the entirety of a comment is scanned/parsed by the GHA - so the following is also valid:

we need these!

/add-sub-issue #1 #2

and we don't need these

/remove-sub-issue #3 #4
  • this would add issues 1 and 2 and remove issues 3 and 4 from the "parent" issue on which the comment was added.

ℹ️ 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 AUTHORIZED_USERS. 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:

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thesuperzapper for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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 kubeflow#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 `AUTHORIZED_USERS`.  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]>
@andyatmiami andyatmiami force-pushed the feat/sub-issue-ghas branch from 4c95283 to 93a9d94 Compare May 28, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

1 participant