Skip to content

Commit

Permalink
Move more workflows to python (#21581)
Browse files Browse the repository at this point in the history
move logic for lock issue workflow back to python repo to avoid extra
work of checking out and cloning vscode-github-triage-actions repo.
Should reduce time it takes to run github actions.
  • Loading branch information
eleanorjboyd authored Jul 10, 2023
1 parent abcb5ce commit 6744590
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 43 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/community-feedback-auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@ jobs:
add-comment:
if: github.event.label.name == 'needs community feedback'
runs-on: ubuntu-latest

permissions:
issues: write

steps:
- name: Checkout Actions
uses: actions/checkout@v3
- name: Check For Existing Comment
uses: peter-evans/find-comment@v2
id: finder
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: stable
path: ./actions

- name: Install Actions
run: npm install --production --prefix ./actions
issue-number: ${{ github.event.issue.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Thanks for the feature request! We are going to give the community'

- name: Add Community Feedback Comment if applicable
uses: ./actions/python-community-feedback-auto-comment
- name: Add Community Feedback Comment
if: steps.finder.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
body: |
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.
33 changes: 24 additions & 9 deletions .github/workflows/pr-file-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: PR files

on:
pull_request:
types:
Expand All @@ -15,15 +16,29 @@ jobs:
name: 'Check for changed files'
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
- name: 'package-lock.json matches package.json'
uses: brettcannon/[email protected]
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: stable
path: ./actions
prereq-pattern: 'package.json'
file-pattern: 'package-lock.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'

- name: Install Actions
run: npm install --production --prefix ./actions
- name: 'package.json matches package-lock.json'
uses: brettcannon/[email protected]
with:
prereq-pattern: 'package-lock.json'
file-pattern: 'package.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'

- name: Check for changed files
uses: ./actions/python-pr-file-check
- name: 'Tests'
uses: brettcannon/[email protected]
with:
prereq-pattern: src/**/*.ts
file-pattern: |
src/**/*.test.ts
src/**/*.testvirtualenvs.ts
.github/test_plan.md
skip-label: 'skip tests'
failure-message: 'TypeScript code was edited without also editing a ${file-pattern} file; see the Testing page in our wiki on testing guidelines (the ${skip-label} label can be used to pass this check)'
16 changes: 5 additions & 11 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ jobs:
name: 'Classify PR'
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
- name: 'PR impact specified'
uses: mheap/github-action-required-labels@v4
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: stable
path: ./actions

- name: Install Actions
run: npm install --production --prefix ./actions

- name: Classify PR
uses: ./actions/python-pr-labels
mode: exactly
count: 1
labels: 'bug, debt, feature-request, no-changelog'
18 changes: 7 additions & 11 deletions .github/workflows/remove-needs-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ jobs:
name: 'Remove needs labels on issue closing'
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
- name: 'Removes needs labels on issue close'
uses: actions-ecosystem/action-remove-labels@v1
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: stable
path: ./actions

- name: Install Actions
run: npm install --production --prefix ./actions

- name: Remove Any Needs Labels
uses: ./actions/python-remove-needs-label
labels: |
needs PR
needs spike
needs community feedback
needs proposal

0 comments on commit 6744590

Please sign in to comment.