Skip to content

Commit 5a2187d

Browse files
sumitmsftCopilot
andauthored
CHORE: Add auto acknowledgment workflow for new issues - updated (#437)
### Work Item / Issue Reference This pull request updates the `.github/workflows/issue-acknowledge.yml` workflow to enhance automation around issue acknowledgment. The main improvements include expanding the list of maintainers, refining permissions, updating the acknowledgment message, and automatically labeling issues that need triage. **Workflow automation and permissions:** * Changed the workflow's `issues` permission from `read` to `write` to enable automated commenting and labeling on issues. * Updated the token used for posting comments and labels from a personal access token to the default `GITHUB_TOKEN` for improved security and maintainability. **Maintainer and triage process improvements:** * Expanded the list of maintainers checked for responses to include several additional team members, improving the accuracy of the maintainer response check. * Enhanced the automated acknowledgment comment to encourage users to provide additional information if needed. * Added a new step to automatically apply the `triage needed` label to issues where no maintainer has responded, streamlining the triage process. <!-- mssql-python maintainers: ADO Work Item --> > [AB#42418](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/42418) ------------------------------------------------------------------- ### Summary This pull request updates the issue acknowledgment GitHub Actions workflow to improve automation and team responsiveness. The most important changes include expanding the list of recognized maintainers, enhancing the automated response, and adding a new step to label issues that need triage. **Workflow improvements:** * Changed `issues` permission from `read` to `write` to allow the workflow to add comments and labels to issues. * Increased the initial wait time before responding to new issues from 10 seconds to 15 minutes, reducing noise and giving maintainers a chance to respond manually. **Maintainer and automation enhancements:** * Expanded the `maintainers` list in the script to include additional team members, ensuring more maintainers are recognized when checking for prior responses. * Updated the automated comment to encourage users to add more information if needed, making the response more helpful and interactive. * Added a new step to automatically add the "triage needed" label to issues if no maintainer has responded, improving the team's ability to track and prioritize new issues.<!-- Insert your summary of changes below. Minimum 10 characters required. --> <!-- ### PR Title Guide > For feature requests FEAT: (short-description) > For non-feature requests like test case updates, config updates , dependency updates etc CHORE: (short-description) > For Fix requests FIX: (short-description) > For doc update requests DOC: (short-description) > For Formatting, indentation, or styling update STYLE: (short-description) > For Refactor, without any feature changes REFACTOR: (short-description) > For release related changes, without any feature changes RELEASE: #<RELEASE_VERSION> (short-description) ### Contribution Guidelines External contributors: - Create a GitHub issue first: https://github.com/microsoft/mssql-python/issues/new - Link the GitHub issue in the "GitHub Issue" section above - Follow the PR title format and provide a meaningful summary mssql-python maintainers: - Create an ADO Work Item following internal processes - Link the ADO Work Item in the "ADO Work Item" section above - Follow the PR title format and provide a meaningful summary --> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f4504e0 commit 5a2187d

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/issue-acknowledge.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
acknowledge:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
issues: read
14+
issues: write
1515
steps:
1616
# Step 1: Wait 15 minutes
1717
- name: Wait 15 minutes
18-
run: sleep 10
18+
run: sleep 900
1919

2020
# Step 2: Check if a maintainer already responded
2121
- name: Check for existing maintainer response
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
github-token: ${{ secrets.GITHUB_TOKEN }}
2626
script: |
27-
const maintainers = ['sumitmsft','dlevy-msft-sql'];
27+
const maintainers = ['sumitmsft','dlevy-msft-sql','gargsaumya','bewithgaurav','subrata-ms','jahnvi480','saurabh500'];
2828
2929
const comments = await github.rest.issues.listComments({
3030
owner: context.repo.owner,
@@ -44,11 +44,25 @@ jobs:
4444
if: steps.check.outputs.skip == 'false'
4545
uses: actions/github-script@v7
4646
with:
47-
github-token: ${{ secrets.SUMIT_PAT_FOR_AUTO_RESPONSE }}
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
4848
script: |
4949
await github.rest.issues.createComment({
5050
owner: context.repo.owner,
5151
repo: context.repo.repo,
5252
issue_number: context.payload.issue.number,
53-
body: `Hi @${context.payload.issue.user.login}, thank you for opening this issue!\n\nOur team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.\n\nThank you for your patience!`
53+
body: `Hi @${context.payload.issue.user.login}, thank you for opening this issue!\n\nOur team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.\n\nIf you have additional information to share, please feel free to update the issue.\n\nThank you for your patience!`
54+
});
55+
56+
# Step 4: Add "triage needed" label if no maintainer has responded
57+
- name: Add triage needed label
58+
if: steps.check.outputs.skip == 'false'
59+
uses: actions/github-script@v7
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
script: |
63+
await github.rest.issues.addLabels({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
issue_number: context.payload.issue.number,
67+
labels: ['triage needed']
5468
});

0 commit comments

Comments
 (0)