Skip to content

Commit 6834b87

Browse files
authored
port over workflows from python ext (#614)
1 parent fb80a37 commit 6834b87

File tree

5 files changed

+168
-0
lines changed

5 files changed

+168
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Community Feedback Auto Comment
2+
3+
on:
4+
issues:
5+
types:
6+
- labeled
7+
jobs:
8+
add-comment:
9+
if: github.event.label.name == 'needs community feedback'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Check For Existing Comment
15+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
16+
id: finder
17+
with:
18+
issue-number: ${{ github.event.issue.number }}
19+
comment-author: 'github-actions[bot]'
20+
body-includes: 'Thanks for the feature request! We are going to give the community'
21+
22+
- name: Add Community Feedback Comment
23+
if: steps.finder.outputs.comment-id == ''
24+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
25+
with:
26+
issue-number: ${{ github.event.issue.number }}
27+
body: |
28+
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Info-Needed Closer
2+
on:
3+
schedule:
4+
- cron: 20 12 * * * # 5:20am Redmond
5+
repository_dispatch:
6+
types: [trigger-needs-more-info]
7+
workflow_dispatch:
8+
9+
permissions:
10+
issues: write
11+
12+
jobs:
13+
main:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Actions
17+
uses: actions/checkout@v4
18+
with:
19+
repository: 'microsoft/vscode-github-triage-actions'
20+
path: ./actions
21+
persist-credentials: false
22+
ref: stable
23+
- name: Install Actions
24+
run: npm install --production --prefix ./actions
25+
- name: Run info-needed Closer
26+
uses: ./actions/needs-more-info-closer
27+
with:
28+
token: ${{secrets.GITHUB_TOKEN}}
29+
label: info-needed
30+
closeDays: 30
31+
closeComment: "Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. \n\nHappy Coding!"
32+
pingDays: 30
33+
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Remove Needs Label'
2+
on:
3+
issues:
4+
types: [closed]
5+
6+
jobs:
7+
classify:
8+
name: 'Remove needs labels on issue closing'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- name: 'Removes needs labels on issue close'
14+
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
15+
with:
16+
labels: |
17+
needs PR
18+
needs spike
19+
needs community feedback
20+
needs proposal
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test Plan Item Validator
2+
on:
3+
issues:
4+
types: [edited, labeled]
5+
6+
permissions:
7+
issues: write
8+
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
13+
steps:
14+
- name: Checkout Actions
15+
uses: actions/checkout@v4
16+
with:
17+
repository: 'microsoft/vscode-github-triage-actions'
18+
path: ./actions
19+
persist-credentials: false
20+
ref: stable
21+
22+
- name: Install Actions
23+
run: npm install --production --prefix ./actions
24+
25+
- name: Run Test Plan Item Validator
26+
uses: ./actions/test-plan-item-validator
27+
with:
28+
label: testplan-item
29+
invalidLabel: invalid-testplan-item
30+
comment: Invalid test plan item. See errors below and the [test plan item spec](https://github.com/microsoft/vscode/wiki/Writing-Test-Plan-Items) for more information. This comment will go away when the issues are resolved.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Triage "info-needed" label
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
env:
8+
TRIAGERS: '["karthiknadig","eleanorjboyd","anthonykim1"]'
9+
10+
jobs:
11+
add_label:
12+
if: contains(github.event.issue.labels.*.name, 'triage-needed') && !contains(github.event.issue.labels.*.name, 'info-needed')
13+
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
16+
steps:
17+
- name: Checkout Actions
18+
uses: actions/checkout@v4
19+
with:
20+
repository: 'microsoft/vscode-github-triage-actions'
21+
ref: stable
22+
path: ./actions
23+
persist-credentials: false
24+
25+
- name: Install Actions
26+
run: npm install --production --prefix ./actions
27+
28+
- name: Add "info-needed" label
29+
uses: ./actions/python-triage-info-needed
30+
with:
31+
triagers: ${{ env.TRIAGERS }}
32+
action: 'add'
33+
token: ${{secrets.GITHUB_TOKEN}}
34+
35+
remove_label:
36+
if: contains(github.event.issue.labels.*.name, 'info-needed') && contains(github.event.issue.labels.*.name, 'triage-needed')
37+
runs-on: ubuntu-latest
38+
permissions:
39+
issues: write
40+
steps:
41+
- name: Checkout Actions
42+
uses: actions/checkout@v4
43+
with:
44+
repository: 'microsoft/vscode-github-triage-actions'
45+
ref: stable
46+
path: ./actions
47+
persist-credentials: false
48+
49+
- name: Install Actions
50+
run: npm install --production --prefix ./actions
51+
52+
- name: Remove "info-needed" label
53+
uses: ./actions/python-triage-info-needed
54+
with:
55+
triagers: ${{ env.TRIAGERS }}
56+
action: 'remove'
57+
token: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)