Migrate issue triage workflows to shared workflows
This commit is contained in:
parent
4e65637471
commit
a5e97b5b6c
8 changed files with 94 additions and 133 deletions
36
.github/workflows/feature-request-comment.yml
vendored
36
.github/workflows/feature-request-comment.yml
vendored
|
|
@ -1,36 +0,0 @@
|
|||
name: Add feature-request comment
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
add-comment-to-feature-request-issues:
|
||||
if: github.event.label.name == 'enhancement'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
BODY: >
|
||||
Thank you for your issue! We have categorized it as a feature request,
|
||||
and it has been added to our backlog. In doing so, **we are not
|
||||
committing to implementing this feature at this time**, but, we will
|
||||
consider it for future releases based on community feedback and our own
|
||||
product roadmap.
|
||||
|
||||
|
||||
Unless you see the
|
||||
https://github.com/cli/cli/labels/help%20wanted label, we are
|
||||
not currently looking for external contributions for this feature.
|
||||
|
||||
|
||||
**If you come across this issue and would like to see it implemented,
|
||||
please add a thumbs up!** This will help us prioritize the feature.
|
||||
Please only comment if you have additional information or viewpoints to
|
||||
contribute.
|
||||
steps:
|
||||
- run: gh issue comment "$NUMBER" --body "$BODY"
|
||||
25
.github/workflows/issueauto.yml
vendored
25
.github/workflows/issueauto.yml
vendored
|
|
@ -1,25 +0,0 @@
|
|||
name: Issue Automation
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: none
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
issue-auto:
|
||||
runs-on: ubuntu-latest
|
||||
environment: cli-automation
|
||||
steps:
|
||||
- name: label incoming issue
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN }}
|
||||
ISSUENUM: ${{ github.event.issue.number }}
|
||||
ISSUEAUTHOR: ${{ github.event.issue.user.login }}
|
||||
run: |
|
||||
if ! gh api orgs/cli/public_members/$ISSUEAUTHOR --silent 2>/dev/null
|
||||
then
|
||||
gh issue edit $ISSUENUM --add-label "needs-triage"
|
||||
fi
|
||||
|
|
@ -918,7 +918,7 @@ testData:
|
|||
|
||||
We have an automation to nudge on issues waiting for user info (like after one week), and close the issue if there's no further activity (like after one more week).
|
||||
|
||||
- Automatically add the stale label to issues labelled needs-user-input after 30 days of inactivity. When the stale label is added, also post a comment to the issue explaining what this means: the issue will close after 30 days of inactivity; contributors can comment on the issue to remove the stale label and keep it open. Maintainers can also add the keep label to make the stale automation ignore that issue.
|
||||
- Automatically add the stale label to issues labelled more-info-needed after 30 days of inactivity. When the stale label is added, also post a comment to the issue explaining what this means: the issue will close after 30 days of inactivity; contributors can comment on the issue to remove the stale label and keep it open. Maintainers can also add the keep label to make the stale automation ignore that issue.
|
||||
- Automatically close issues labelled stale after they have been stale for 30 days. When the issue is closed, add a comment explaining why this happened. Encourage them to leave a comment if the close was done in error.
|
||||
- The above automation should only act on new issues after the date of the automation's implementation.
|
||||
</BODY>
|
||||
|
|
|
|||
2
.github/workflows/stale-issues.yml
vendored
2
.github/workflows/stale-issues.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
start-date: "2025-07-10T00:00:00Z" # Skip for issues created before this date
|
||||
days-before-issue-stale: 30
|
||||
only-issue-labels:
|
||||
"needs-triage,needs-user-input" # Only issues with all of these labels can be marked as stale
|
||||
"needs-triage,more-info-needed" # Only issues with all of these labels can be marked as stale
|
||||
exempt-issue-labels: "keep" # Issues marked with this label should not be marked as stale
|
||||
stale-issue-label: "stale" # Mark stale issues with this label
|
||||
stale-issue-message: |
|
||||
|
|
|
|||
61
.github/workflows/triage-issues.yml
vendored
Normal file
61
.github/workflows/triage-issues.yml
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
name: Issue Triaging
|
||||
on:
|
||||
issues:
|
||||
types: [opened, reopened, labeled, unlabeled, closed]
|
||||
|
||||
jobs:
|
||||
label-incoming:
|
||||
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'unlabeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-label-incoming.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
close-invalid:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-invalid.yml@main
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
close-suspected-spam:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-suspected-spam.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
close-single-word:
|
||||
if: github.event.action == 'opened'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-single-word-issues.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
close-off-topic:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-off-topic.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
enhancement-comment:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-enhancement-comment.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
unable-to-reproduce:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-unable-to-reproduce-comment.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
remove-needs-triage:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-remove-needs-triage.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
on-issue-close:
|
||||
if: github.event.action == 'closed'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-on-issue-close.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
13
.github/workflows/triage-scheduled-tasks.yml
vendored
Normal file
13
.github/workflows/triage-scheduled-tasks.yml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
name: Triage Scheduled Tasks
|
||||
on:
|
||||
workflow_dispatch:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
schedule:
|
||||
- cron: '5 * * * *' # Hourly — no-response close
|
||||
|
||||
jobs:
|
||||
no-response:
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-no-response-close.yml@main
|
||||
permissions:
|
||||
issues: write
|
||||
74
.github/workflows/triage.yml
vendored
74
.github/workflows/triage.yml
vendored
|
|
@ -5,70 +5,18 @@ on:
|
|||
issues:
|
||||
types:
|
||||
- labeled
|
||||
# pull_request_target (not pull_request) to access secrets for fork PRs.
|
||||
# Safe: no PR code is checked out or executed.
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
env:
|
||||
TARGET_REPO: github/cli
|
||||
|
||||
jobs:
|
||||
issue:
|
||||
environment: cli-discuss-automation
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'issues' && github.event.action == 'labeled' && github.event.label.name == 'discuss'
|
||||
steps:
|
||||
- name: Create issue based on source issue
|
||||
env:
|
||||
BODY: ${{ github.event.issue.body }}
|
||||
CREATED: ${{ github.event.issue.created_at }}
|
||||
GH_TOKEN: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }}
|
||||
LINK: ${{ github.repository }}#${{ github.event.issue.number }}
|
||||
TITLE: ${{ github.event.issue.title }}
|
||||
TRIGGERED_BY: ${{ github.triggering_actor }}
|
||||
run: |
|
||||
# Markdown quote source body by replacing newlines for newlines and markdown quoting
|
||||
BODY="${BODY//$'\n'/$'\n'> }"
|
||||
|
||||
# Create issue using dynamically constructed body within heredoc
|
||||
cat << EOF | gh issue create --title "Triage issue \"$TITLE\"" --body-file - --repo "$TARGET_REPO" --label triage
|
||||
**Title:** $TITLE
|
||||
**Issue:** $LINK
|
||||
**Created:** $CREATED
|
||||
**Triggered by:** @$TRIGGERED_BY
|
||||
|
||||
---
|
||||
|
||||
cc: @github/cli
|
||||
|
||||
> $BODY
|
||||
EOF
|
||||
|
||||
pull_request:
|
||||
runs-on: ubuntu-latest
|
||||
environment: cli-discuss-automation
|
||||
if: github.event_name == 'pull_request_target' && github.event.action == 'labeled' && github.event.label.name == 'discuss'
|
||||
steps:
|
||||
- name: Create issue based on source pull request
|
||||
env:
|
||||
BODY: ${{ github.event.pull_request.body }}
|
||||
CREATED: ${{ github.event.pull_request.created_at }}
|
||||
GH_TOKEN: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }}
|
||||
LINK: ${{ github.repository }}#${{ github.event.pull_request.number }}
|
||||
TITLE: ${{ github.event.pull_request.title }}
|
||||
TRIGGERED_BY: ${{ github.triggering_actor }}
|
||||
run: |
|
||||
# Markdown quote source body by replacing newlines for newlines and markdown quoting
|
||||
BODY="${BODY//$'\n'/$'\n'> }"
|
||||
|
||||
# Create issue using dynamically constructed body within heredoc
|
||||
cat << EOF | gh issue create --title "Triage PR \"$TITLE\"" --body-file - --repo "$TARGET_REPO" --label triage
|
||||
**Title:** $TITLE
|
||||
**Pull request:** $LINK
|
||||
**Created:** $CREATED
|
||||
**Triggered by:** @$TRIGGERED_BY
|
||||
|
||||
---
|
||||
|
||||
cc: @github/cli
|
||||
|
||||
> $BODY
|
||||
EOF
|
||||
discuss:
|
||||
if: github.event.action == 'labeled'
|
||||
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-discuss.yml@main
|
||||
with:
|
||||
target_repo: 'github/cli'
|
||||
cc_team: '@github/cli'
|
||||
secrets:
|
||||
discussion_token: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,16 @@ For bugs, the FR should engage with the issue and community with the goal to rem
|
|||
|
||||
To be considered triaged, `bug` issues require the following:
|
||||
|
||||
- A severity label `p1`, `p2`, and `p3`
|
||||
- A severity label `priority-1`, `priority-2`, and `priority-3`
|
||||
- Clearly defined Acceptance Criteria, added to the Issue as a standalone comment (see [example](https://github.com/cli/cli/issues/9469#issuecomment-2292315743))
|
||||
|
||||
#### Bug severities
|
||||
|
||||
| Severity | Description |
|
||||
| - | - |
|
||||
| `p1` | Affects a large population and inhibits work |
|
||||
| `p2` | Affects more than a few users but doesn't prevent core functions |
|
||||
| `p3` | Affects a small number of users or is largely cosmetic |
|
||||
| `priority-1` | Affects a large population and inhibits work |
|
||||
| `priority-2` | Affects more than a few users but doesn't prevent core functions |
|
||||
| `priority-3` | Affects a small number of users or is largely cosmetic |
|
||||
|
||||
### Enhancements and Docs
|
||||
|
||||
|
|
@ -36,10 +36,10 @@ When a new issue is opened, the FR **should**:
|
|||
- Ensure there is enough information to understand the enhancement's scope and value
|
||||
- Ask the user for more information about value and use-case, if necessary
|
||||
- Leave the `needs-triage` label on the issue
|
||||
- Add the `needs-user-input` and `needs-investigation` labels as needed
|
||||
- Add the `more-info-needed` and `needs-investigation` labels as needed
|
||||
|
||||
When the FR has enough information to be triaged, they should:
|
||||
- Remove the `needs-user-input` and `needs-investigation` labels
|
||||
- Remove the `more-info-needed` and `needs-investigation` labels
|
||||
- Remove their assignment from the issue
|
||||
|
||||
The FR should **avoid**:
|
||||
|
|
@ -57,7 +57,7 @@ The FR can consider adding any of the following labels below.
|
|||
| - | - |
|
||||
| `discuss` | Some issues require discussion with the internal team. Adding this label will automatically open up an internal discussion with the team to facilitate this discussion. |
|
||||
| `core` | Defines what we would like to do internally. We tend to lean towards `help wanted` by default, and adding `core` should be reserved for trickier issues or implementations we have strong opinions/preferences about. |
|
||||
| `needs-user-input` | After asking any contributors for more information, add this label so it is clear that the issue has been responded to and we are waiting on the user. |
|
||||
| `more-info-needed` | After asking any contributors for more information, add this label so it is clear that the issue has been responded to and we are waiting on the user. |
|
||||
| `needs-investigation` | Used when the issue requires further investigation before it can be reviewed and triaged. This is often used for issues that are not clearly bugs or enhancements, or when the FR needs to gather more information before proceeding. |
|
||||
| `invalid` | Added to spam and abusive issues. |
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue