Repository navigation
Introduce triage system #3126
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
Merged
aryangorwade
merged 1 commit into
NVIDIA:main
from
aryangorwade:external-contributor-policy
Nov 4, 2026
Merged
Introduce triage system #3126
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,8 @@ | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: Question / General Discussion | ||
| url: https://github.com/NVIDIA/gpu-operator/discussions | ||
| about: Ask a question or raise a discussion related to GPU Operator | ||
| - name: Community Slack (#gpu-operator) | ||
| url: https://inviter.co/dsx-ai-factory | ||
| about: Chat with the GPU Operator team and community | ||
|
aryangorwade marked this conversation as resolved.
Resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # Copyright NVIDIA CORPORATION | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Assign | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| assign: | ||
| name: Assign issue from /assign comment | ||
| if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, '/assign') }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | ||
| with: | ||
| script: | | ||
| const { owner, repo } = context.repo; | ||
| const { comment, issue } = context.payload; | ||
| const react = (content) => | ||
| github.rest.reactions.createForIssueComment({ owner, repo, comment_id: comment.id, content }); | ||
|
|
||
| const firstLine = comment.body.split(/\r?\n/, 1)[0].trim(); | ||
| if (!/^\/assign(\s|$)/.test(firstLine)) { | ||
| return; | ||
| } | ||
|
|
||
| // Matches GitHub's own rule: assigning requires the triage role or higher. | ||
| const { data: perm } = await github.rest.repos.getCollaboratorPermissionLevel({ | ||
| owner, | ||
| repo, | ||
| username: comment.user.login, | ||
| }); | ||
| const canAssign = ['admin', 'maintain', 'write', 'triage'].includes(perm.role_name) | ||
| || ['admin', 'write'].includes(perm.permission); | ||
| if (!canAssign) { | ||
| return react('-1'); | ||
| } | ||
|
|
||
| const match = firstLine.match(/^\/assign(?:\s+@?([A-Za-z0-9-]+))?$/); | ||
| if (!match || !issue.labels.some((label) => label.name === 'accepted')) { | ||
| return react('confused'); | ||
| } | ||
|
|
||
| const assignee = match[1] ?? comment.user.login; | ||
| const { data: updated } = await github.rest.issues.addAssignees({ | ||
| owner, | ||
| repo, | ||
| issue_number: issue.number, | ||
| assignees: [assignee], | ||
| }); | ||
|
aryangorwade marked this conversation as resolved.
Resolved
|
||
| // GitHub silently skips users it cannot assign, such as people who have not commented on the issue. | ||
| if (!updated.assignees.some((a) => a.login.toLowerCase() === assignee.toLowerCase())) { | ||
| return react('confused'); | ||
| } | ||
|
|
||
| // The PR gatekeeper accepts any assignee, so a new claimant must replace the previous ones. | ||
| // Maintainers stay assigned because the gatekeeper does not apply to them. | ||
| const previousClaimants = []; | ||
| for (const { login } of updated.assignees) { | ||
| if (login.toLowerCase() === assignee.toLowerCase()) { | ||
| continue; | ||
| } | ||
| const { data: level } = await github.rest.repos.getCollaboratorPermissionLevel({ | ||
| owner, | ||
| repo, | ||
| username: login, | ||
| }); | ||
| if (!['admin', 'maintain', 'write'].includes(level.permission)) { | ||
| previousClaimants.push(login); | ||
| } | ||
| } | ||
| if (previousClaimants.length > 0) { | ||
| await github.rest.issues.removeAssignees({ | ||
| owner, | ||
| repo, | ||
| issue_number: issue.number, | ||
| assignees: previousClaimants, | ||
| }); | ||
| } | ||
| return react('+1'); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Copyright NVIDIA CORPORATION | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Issue State Labels | ||
|
|
||
| on: | ||
| issues: | ||
| types: [labeled] | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: issue-state-${{ github.event.issue.number }} | ||
|
|
||
| jobs: | ||
| single-state: | ||
| name: Keep one state label per issue | ||
| if: contains(fromJSON('["needs-triage","needs-more-info","accepted"]'), github.event.label.name) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | ||
| with: | ||
| script: | | ||
| const stateLabels = ['needs-triage', 'needs-more-info', 'accepted']; | ||
| const { owner, repo } = context.repo; | ||
| const issue_number = context.payload.issue.number; | ||
| const added = context.payload.label.name; | ||
| if (!stateLabels.includes(added)) { | ||
| return; | ||
| } | ||
| const { data: labels } = await github.rest.issues.listLabelsOnIssue({ owner, repo, issue_number }); | ||
| const current = labels.map((label) => label.name); | ||
| // Adding two state labels at once starts two runs; a later run must not undo an earlier one. | ||
| if (!current.includes(added)) { | ||
| return; | ||
| } | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
Resolved
|
||
| for (const name of current.filter((label) => stateLabels.includes(label) && label !== added)) { | ||
| try { | ||
| await github.rest.issues.removeLabel({ owner, repo, issue_number, name }); | ||
| core.info(`Removed ${name}: ${added} replaces it.`); | ||
| } catch (error) { | ||
| if (error.status !== 404) { | ||
| throw error; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright NVIDIA CORPORATION | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Issue Triage | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| label: | ||
| name: Label new issues for triage | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| # Issue templates apply needs-triage, but issues created through the API skip templates. | ||
| - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | ||
| with: | ||
| script: | | ||
| const stateLabels = ['needs-triage', 'needs-more-info', 'accepted']; | ||
| const labels = context.payload.issue.labels.map((label) => label.name); | ||
| if (labels.some((label) => stateLabels.includes(label))) { | ||
| return; | ||
| } | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.issue.number, | ||
| labels: ['needs-triage'], | ||
|
aryangorwade marked this conversation as resolved.
Resolved
|
||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.