From c23bfe9b2bfc7397150a9caa4a0b84cc36637d2c Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 14:58:12 -0700 Subject: [PATCH 01/36] Move triage-needed flow to repository --- .github/workflows/triage-info-needed.yml | 100 ++++++----------------- 1 file changed, 25 insertions(+), 75 deletions(-) diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index 51c5b610f03f..d31fef2911ff 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -11,86 +11,36 @@ jobs: add_label: runs-on: ubuntu-latest if: contains(github.event.issue.labels.*.name, 'triage-needed') && !contains(github.event.issue.labels.*.name, 'info-needed') - env: - KEYWORDS: '["\\?", "please", "kindly", "let me know", "try", "can you", "could you", "would you", "may I", "provide", "let us know", "tell me", "give me", "send me", "what", "when", "where", "why", "how"]' steps: - - name: Check for author - uses: actions/github-script@v6 + - name: Checkout Actions + uses: actions/checkout@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number - }); - const commentAuthor = context.payload.comment.user.login; - const commentBody = context.payload.comment.body; - const isTeamMember = ${{ env.TRIAGERS }}.includes(commentAuthor); - - const keywords = ${{ env.KEYWORDS }}; - const isRequestForInfo = new RegExp(keywords.join('|'), 'i').test(commentBody); - - const shouldAddLabel = isTeamMember && commentAuthor !== issue.data.user.login && isRequestForInfo; - - if (shouldAddLabel) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['info-needed'] - }); - } + repository: 'microsoft/vscode-github-triage-actions' + path: ./actions + ref: stable + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Add "info-needed" label + uses: ./actions/triage-info-needed + with: + triagers: ${{ env.TRIAGERS }} + action: 'add' + token: ${{secrets.GITHUB_TOKEN}} remove_label: if: contains(github.event.issue.labels.*.name, 'info-needed') && contains(github.event.issue.labels.*.name, 'triage-needed') runs-on: ubuntu-latest steps: - - name: Check for author - uses: actions/github-script@v6 + - name: Checkout Actions + uses: actions/checkout@v3 + with: + repository: 'microsoft/vscode-github-triage-actions' + path: ./actions + ref: stable + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Remove "info-needed" label + uses: ./actions/triage-info-needed with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number - }); - const commentAuthor = context.payload.comment.user.login; - const issueAuthor = issue.data.user.login; - if (commentAuthor === issueAuthor) { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'info-needed' - }); - return; - } - if (${{ env.TRIAGERS }}.includes(commentAuthor)) { - // If one of triagers made a comment, ignore it - return; - } - // Loop through all the comments on the issue in reverse order and find the last username that a TRIAGER mentioned - // If the comment author is the last mentioned username, remove the "info-needed" label - const comments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number - }); - for (const comment of comments.data.slice().reverse()) { - if (!${{ env.TRIAGERS }}.includes(comment.user.login)) { - continue; - } - const matches = comment.body.match(/@\w+/g) || []; - const mentionedUsernames = matches.map(match => match.replace('@', '')); - if (mentionedUsernames.includes(commentAuthor)) { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - name: 'info-needed' - }); - break; - } - } + triagers: ${{ env.TRIAGERS }} + action: 'remove' From ffd9527649b47b5ee796d663b00f2c9ecd799e30 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 15:07:04 -0700 Subject: [PATCH 02/36] Use my repo --- .github/workflows/triage-info-needed.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index d31fef2911ff..f20afabbe45c 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'microsoft/vscode-github-triage-actions' + repository: 'karrtikr/vscode-python-github-actions' path: ./actions ref: stable - name: Install Actions @@ -34,7 +34,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'microsoft/vscode-github-triage-actions' + repository: 'karrtikr/vscode-python-github-actions' path: ./actions ref: stable - name: Install Actions From 7374ad82a4cb39b37b016895421a514e65382b35 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 15:14:31 -0700 Subject: [PATCH 03/36] Remove ref --- .github/workflows/triage-info-needed.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index f20afabbe45c..c3b883ddee99 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -17,7 +17,6 @@ jobs: with: repository: 'karrtikr/vscode-python-github-actions' path: ./actions - ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Add "info-needed" label @@ -36,7 +35,6 @@ jobs: with: repository: 'karrtikr/vscode-python-github-actions' path: ./actions - ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Remove "info-needed" label From 59913759d6ed2f055c81907d8822b81aa58720b8 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 16:14:11 -0700 Subject: [PATCH 04/36] Add commuity feedback comment --- .../community-feedback-auto-comment.yml | 36 +++++++------------ .github/workflows/triage-info-needed.yml | 1 + 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml index cbba6db30b50..965e50eb7ffb 100644 --- a/.github/workflows/community-feedback-auto-comment.yml +++ b/.github/workflows/community-feedback-auto-comment.yml @@ -1,30 +1,18 @@ -name: Community Feedback Auto Comment +name: My Workflow on: issues: types: - labeled -jobs: - add-comment: - if: github.event.label.name == 'needs community feedback' - runs-on: ubuntu-latest - - permissions: - issues: write - steps: - - name: Check For Existing Comment - uses: peter-evans/find-comment@v2 - id: finder - with: - 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: 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. +jobs: + community-feedback-auto-comment: + - name: Checkout Actions + uses: actions/checkout@v3 + with: + repository: 'karrtikr/vscode-python-github-actions' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Add community feedback auto comment if applicable + uses: ./actions/community-feedback-auto-comment diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index c3b883ddee99..fabb17ffa484 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -42,3 +42,4 @@ jobs: with: triagers: ${{ env.TRIAGERS }} action: 'remove' + token: ${{secrets.GITHUB_TOKEN}} From be5e3aa9acae035cd362ae136c6f4c0ba368b400 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 16:22:29 -0700 Subject: [PATCH 05/36] Update --- .../community-feedback-auto-comment.yml | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml index 965e50eb7ffb..ca06acff2c57 100644 --- a/.github/workflows/community-feedback-auto-comment.yml +++ b/.github/workflows/community-feedback-auto-comment.yml @@ -1,18 +1,26 @@ -name: My Workflow +name: Community Feedback Auto Comment on: issues: types: - labeled - jobs: - community-feedback-auto-comment: - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: 'karrtikr/vscode-python-github-actions' - path: ./actions - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Add community feedback auto comment if applicable - uses: ./actions/community-feedback-auto-comment + add-comment: + if: github.event.label.name == 'needs community feedback' + runs-on: ubuntu-latest + + permissions: + issues: write + + steps: + - name: Check For Existing Comment + uses: peter-evans/find-comment@v2 + id: finder + with: + issue-number: ${{ github.event.issue.number }} + + - 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 }} From e93ed5ffafbf0e0fab5ec133211e8a27d8f9965d Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 16:37:28 -0700 Subject: [PATCH 06/36] How a --- .github/workflows/community-feedback-auto-comment.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml index ca06acff2c57..42406549626b 100644 --- a/.github/workflows/community-feedback-auto-comment.yml +++ b/.github/workflows/community-feedback-auto-comment.yml @@ -18,9 +18,12 @@ jobs: id: finder with: issue-number: ${{ github.event.issue.number }} + body-includes: Thanks for the feature request! We are going to give the community - 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. From e03687be4bec18042c475759c998e1699cffcddd Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 16:39:18 -0700 Subject: [PATCH 07/36] k --- .../community-feedback-auto-comment.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml index 42406549626b..54e5781cd54c 100644 --- a/.github/workflows/community-feedback-auto-comment.yml +++ b/.github/workflows/community-feedback-auto-comment.yml @@ -13,17 +13,14 @@ jobs: issues: write steps: - - name: Check For Existing Comment - uses: peter-evans/find-comment@v2 - id: finder + - name: Checkout Actions + uses: actions/checkout@v3 with: - issue-number: ${{ github.event.issue.number }} - body-includes: Thanks for the feature request! We are going to give the community - - - name: Add Community Feedback Comment - if: steps.finder.outputs.comment-id == '' - uses: peter-evans/create-or-update-comment@v3 + repository: 'karrtikr/vscode-python-github-actions' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Add Community Feedback Comment if applicable + uses: ./actions/community-feedback-auto-comment 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. From 5453e50f92faedc59cc7d5990795c9606bd0227d Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 2 May 2023 17:10:06 -0700 Subject: [PATCH 08/36] As --- .github/workflows/issue-labels.yml | 63 ++++++------------------------ 1 file changed, 12 insertions(+), 51 deletions(-) diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml index 520592be2fce..ffed05979daf 100644 --- a/.github/workflows/issue-labels.yml +++ b/.github/workflows/issue-labels.yml @@ -18,55 +18,16 @@ jobs: name: "Add 'triage-needed' and remove unrecognizable labels & assignees" runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - name: Checkout Actions + uses: actions/checkout@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const result = await github.rest.issues.listLabelsOnIssue({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }) - const labels = result.data.map((label) => label.name) - const hasNeedsOrTPI = labels.some((label) => (label.startsWith('needs') || label === 'testplan-item' || label.startsWith('iteration-plan') || label === 'release-plan')) - - if (!hasNeedsOrTPI) { - console.log('This issue is not labeled with a "needs __", "iteration-plan", "release-plan", or the "testplan-item" label; add the "triage-needed" label.') - - github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['triage-needed'] - }) - } else { - console.log('This issue already has a "needs __", "iteration-plan", "release-plan", or the "testplan-item" label, do not add the "triage-needed" label.') - } - const knownTriagers = ${{ env.TRIAGERS }} - const currentAssignees = await github.rest.issues - .get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }) - .then((result) => result.data.assignees.map((a) => a.login)); - console.log('Known triagers:', JSON.stringify(knownTriagers)); - console.log('Current assignees:', JSON.stringify(currentAssignees)); - const assigneesToRemove = currentAssignees.filter(a => !knownTriagers.includes(a)); - console.log('Assignees to remove:', JSON.stringify(assigneesToRemove)); - github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - assignees: assigneesToRemove, - }); - const knownLabels = ${{ env.REPO_LABELS }} - for( const label of labels) { - if (!knownLabels.includes(label)) { - await github.rest.issues.deleteLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - name: label, - }) - } - } + repository: 'karrtikr/vscode-python-github-actions' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: "Add 'triage-needed' and remove unrecognizable labels & assignees" + uses: ./actions/issue-labels + with: + triagers: ${{ env.TRIAGERS }} + token: ${{secrets.GITHUB_TOKEN}} + repo_labels: ${{ env.REPO_LABELS }} From 6934ea85fc759f827abd33ce9bdb43034e9ad598 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 15:03:56 -0700 Subject: [PATCH 09/36] Refacor lock issues --- .github/workflows/lock-issues.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lock-issues.yml b/.github/workflows/lock-issues.yml index 6417d415fcfe..2a2024108d78 100644 --- a/.github/workflows/lock-issues.yml +++ b/.github/workflows/lock-issues.yml @@ -15,9 +15,14 @@ jobs: lock-issues: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v4 + - name: Checkout Actions + uses: actions/checkout@v3 with: - github-token: ${{ github.token }} - issue-inactive-days: '30' - process-only: 'issues' - log-output: true + repository: 'karrtikr/vscode-python-github-actions' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: 'Lock Issues' + uses: ./actions/lock-issues + with: + token: ${{ github.token }} From 3e849bd3abfdc69bcb0764e0fbc61305c3871ad6 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:21:45 -0700 Subject: [PATCH 10/36] Use microsoft repo --- .github/workflows/community-feedback-auto-comment.yml | 2 +- .github/workflows/issue-labels.yml | 2 +- .github/workflows/lock-issues.yml | 2 +- .github/workflows/triage-info-needed.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/community-feedback-auto-comment.yml b/.github/workflows/community-feedback-auto-comment.yml index 54e5781cd54c..8627972e65a6 100644 --- a/.github/workflows/community-feedback-auto-comment.yml +++ b/.github/workflows/community-feedback-auto-comment.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'karrtikr/vscode-python-github-actions' + repository: 'microsoft/vscode-python-engineering' path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml index ffed05979daf..cd92e58be93f 100644 --- a/.github/workflows/issue-labels.yml +++ b/.github/workflows/issue-labels.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'karrtikr/vscode-python-github-actions' + repository: 'microsoft/vscode-python-engineering' path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/lock-issues.yml b/.github/workflows/lock-issues.yml index 2a2024108d78..c4c78cbaf5cb 100644 --- a/.github/workflows/lock-issues.yml +++ b/.github/workflows/lock-issues.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'karrtikr/vscode-python-github-actions' + repository: 'microsoft/vscode-python-engineering' path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index fabb17ffa484..868e773cefc6 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'karrtikr/vscode-python-github-actions' + repository: 'microsoft/vscode-python-engineering' path: ./actions - name: Install Actions run: npm install --production --prefix ./actions @@ -33,7 +33,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 with: - repository: 'karrtikr/vscode-python-github-actions' + repository: 'microsoft/vscode-python-engineering' path: ./actions - name: Install Actions run: npm install --production --prefix ./actions From 5b5be2c5e5924f99416990574cc259f135a36211 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:30:16 -0700 Subject: [PATCH 11/36] pr file check --- .github/workflows/pr-file-check.yml | 33 +++++++---------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pr-file-check.yml b/.github/workflows/pr-file-check.yml index 3eb7ad7b6338..e398221be31c 100644 --- a/.github/workflows/pr-file-check.yml +++ b/.github/workflows/pr-file-check.yml @@ -15,29 +15,12 @@ jobs: name: 'Check for changed files' runs-on: ubuntu-latest steps: - - name: 'package-lock.json matches package.json' - uses: brettcannon/check-for-changed-files@v1.1.0 + - name: Checkout Actions + uses: actions/checkout@v3 with: - 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: 'package.json matches package-lock.json' - uses: brettcannon/check-for-changed-files@v1.1.0 - 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: 'Tests' - uses: brettcannon/check-for-changed-files@v1.1.0 - 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)' + repository: 'microsoft/vscode-python-engineering' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Check for changed files + uses: ./actions/pr-file-check From 4e679e9401c9d29179c073657ba12202cd567319 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:33:02 -0700 Subject: [PATCH 12/36] hello --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd6ddcea84ca..5e07a9b4e696 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "envCollectionWorkspace" ], "author": { - "name": "Microsoft Corporation" + "name": "Microsoft Corporationsasd" }, "license": "MIT", "homepage": "https://github.com/Microsoft/vscode-python", From 8043b719abe0e15776d7ab7a5990b4141ea816f3 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:38:53 -0700 Subject: [PATCH 13/36] Use pr label action --- .github/workflows/pr-labels.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index e953f62d2011..0f58620cf276 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -13,9 +13,12 @@ jobs: name: 'Classify PR' runs-on: ubuntu-latest steps: - - name: 'PR impact specified' - uses: mheap/github-action-required-labels@v4 + - name: Checkout Actions + uses: actions/checkout@v3 with: - mode: exactly - count: 1 - labels: 'bug, debt, feature-request, no-changelog' + repository: 'microsoft/vscode-python-engineering' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Classify PR + uses: ./actions/pr-labels From 55e25366400580078e4d390b10e14d141228b2eb Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:40:24 -0700 Subject: [PATCH 14/36] hiya --- .github/workflows/pr-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 0f58620cf276..2936a9a766e2 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -10,7 +10,7 @@ on: jobs: classify: - name: 'Classify PR' + name: 'Classiasdsadfy PR' runs-on: ubuntu-latest steps: - name: Checkout Actions From 73fdaac02afeaaeb1826447b03431c7aa5f8b5bc Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:48:21 -0700 Subject: [PATCH 15/36] Correct --- .github/workflows/pr-labels.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 2936a9a766e2..0f58620cf276 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -10,7 +10,7 @@ on: jobs: classify: - name: 'Classiasdsadfy PR' + name: 'Classify PR' runs-on: ubuntu-latest steps: - name: Checkout Actions diff --git a/package.json b/package.json index 5e07a9b4e696..fd6ddcea84ca 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "envCollectionWorkspace" ], "author": { - "name": "Microsoft Corporationsasd" + "name": "Microsoft Corporation" }, "license": "MIT", "homepage": "https://github.com/Microsoft/vscode-python", From acd89be8939a737ae73fa319c46c94bc90e471f7 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Wed, 3 May 2023 16:52:51 -0700 Subject: [PATCH 16/36] Use lint from separate repo --- .github/actions/lint/action.yml | 49 --------------------------------- .github/workflows/build.yml | 10 +++++-- .github/workflows/pr-check.yml | 10 +++++-- 3 files changed, 14 insertions(+), 55 deletions(-) delete mode 100644 .github/actions/lint/action.yml diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml deleted file mode 100644 index 9478550c107b..000000000000 --- a/.github/actions/lint/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 'Lint' -description: 'Lint TypeScript and Python code' - -inputs: - node_version: - description: 'Version of Node to install' - required: true - -runs: - using: 'composite' - steps: - - name: Install Node - uses: actions/setup-node@v2 - with: - node-version: ${{ inputs.node_version }} - cache: 'npm' - - - name: Install Node dependencies - run: npm ci --prefer-offline - shell: bash - - - name: Run `gulp prePublishNonBundle` - run: npx gulp prePublishNonBundle - shell: bash - - - name: Check dependencies - run: npm run checkDependencies - shell: bash - - - name: Lint TypeScript code - run: npm run lint - shell: bash - - - name: Check TypeScript format - run: npm run format-check - shell: bash - - - name: Install Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - cache: 'pip' - - - name: Check Python format - run: | - python -m pip install -U black - python -m black . --check - working-directory: pythonFiles - shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 805077ffdb46..7c15296d8cb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,11 +63,15 @@ jobs: if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout Actions uses: actions/checkout@v3 - + with: + repository: 'microsoft/vscode-python-engineering' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions - name: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2ac560af995d..d1b6bc147f52 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -38,11 +38,15 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout Actions uses: actions/checkout@v3 - + with: + repository: 'microsoft/vscode-python-engineering' + path: ./actions + - name: Install Actions + run: npm install --production --prefix ./actions - name: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} From 808d748d285f96a136c0a18841382d09a8cc44f9 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:01:34 -0700 Subject: [PATCH 17/36] sad --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2ac560af995d..ef4ea01049b7 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Build VSIX + - name: Build VSIXz uses: ./.github/actions/build-vsix with: node_version: ${{ env.NODE_VERSION}} From 5f8e8253909ca1b263c35ac3cc0de106873e8c1b Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:07:29 -0700 Subject: [PATCH 18/36] try this --- .github/workflows/pr-check.yml | 425 --------------------------------- 1 file changed, 425 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index ef4ea01049b7..75a1e907213a 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -20,20 +20,6 @@ env: special-working-directory-relative: 'path with spaces' jobs: - build-vsix: - name: Create VSIX - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Build VSIXz - uses: ./.github/actions/build-vsix - with: - node_version: ${{ env.NODE_VERSION}} - vsix_name: ${{ env.VSIX_NAME }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - lint: name: Lint runs-on: ubuntu-latest @@ -78,414 +64,3 @@ jobs: uses: jakebailey/pyright-action@v1 with: working-directory: 'pythonFiles' - - ### Non-smoke tests - tests: - name: Tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: ${{ env.special-working-directory }} - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. - os: [ubuntu-latest, windows-latest] - # Run the tests on the oldest and most recent versions of Python. - python: ['3.x'] - test-suite: [ts-unit, python-unit, venv, single-workspace, debugger, functional] - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: ${{ env.special-working-directory-relative }} - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - - name: Install debugpy - run: | - # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/python" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/pythonFiles/jedilsp_requirements/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/jedilsp" --no-cache-dir --implementation py' - if: startsWith(matrix.python, 3.) - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install debugpy wheels (Python ${{ matrix.python }}) - run: | - python -m pip install wheel - python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt - python ./pythonFiles/install_debugpy.py - shell: bash - if: matrix.test-suite == 'debugger' - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - if: matrix.test-suite == 'functional' - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - # 1. For `terminalActivation.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION - run: | - echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV - echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV - shell: bash - if: matrix.test-suite != 'ts-unit' - - # Run TypeScript unit tests only for Python 3.X. - - name: Run TypeScript unit tests - run: npm run test:unittests - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - - # Run the Python tests in our codebase. - - name: Run Python unit tests - run: | - python pythonFiles/tests/run_all.py - if: matrix.test-suite == 'python-unit' - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'venv' && matrix.os == 'ubuntu-latest' - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'single-workspace' - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testDebugger - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'debugger' - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - run: npm run test:functional - if: matrix.test-suite == 'functional' - - smoke-tests: - name: Smoke tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - needs: [build-vsix] - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. - os: [ubuntu-latest, windows-latest] - steps: - # Need the source to have the tests available. - - name: Checkout - uses: actions/checkout@v3 - - - name: Smoke tests - uses: ./.github/actions/smoke-tests - with: - node_version: ${{ env.NODE_VERSION }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - - ### Coverage run - coverage: - name: Coverage - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Only run coverage on linux for PRs - os: [ubuntu-latest] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' - cache-dependency-path: | - requirements.txt - pythonFiles/jedilsp_requirements/requirements.txt - build/test-requirements.txt - build/functional-test-requirements.txt - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./pythonFiles/lib/python --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt' - options: '-t ./pythonFiles/lib/jedilsp --implementation py' - - - name: Install debugpy - run: | - # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. - python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --implementation py --no-deps --upgrade --pre debugpy - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - # 1. For `terminalActivation.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Run TypeScript unit tests - run: npm run test:unittests:cover - - - name: Run Python unit tests - run: | - python pythonFiles/tests/run_all.py - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - # Enable these tests when coverage is setup for multiroot workspace tests - # - name: Run multi-workspace tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testMultiWorkspace:cover - - # Enable these tests when coverage is setup for debugger tests - # - name: Run debugger tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testDebugger:cover - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - run: npm run test:functional:cover - - - name: Generate coverage reports - run: npm run test:cover:report - - - name: Upload HTML report - uses: actions/upload-artifact@v3 - with: - name: ${{ runner.os }}-coverage-report-html - path: ./coverage - retention-days: 1 From f8bee600d7ee7e8326cfbe1ff2e6662f933a9d95 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:16:23 -0700 Subject: [PATCH 19/36] try --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c15296d8cb7..36fe5db5bfcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,11 +67,11 @@ jobs: uses: actions/checkout@v3 with: repository: 'microsoft/vscode-python-engineering' - path: ./actions + path: ./.github/actions - name: Install Actions run: npm install --production --prefix ./actions - name: Lint - uses: ./actions/lint + uses: ./.github/actions/lint with: node_version: ${{ env.NODE_VERSION }} From 924bdc67dc7137b8bcbb258d84ebe44ac34ea843 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:18:56 -0700 Subject: [PATCH 20/36] checkout again --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36fe5db5bfcb..27f2978d1f95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,6 +70,8 @@ jobs: path: ./.github/actions - name: Install Actions run: npm install --production --prefix ./actions + - name: Checkout Actions + uses: actions/checkout@v3 - name: Lint uses: ./.github/actions/lint with: From 35987d39521277866c116d8a22c02f627aa229ec Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:20:07 -0700 Subject: [PATCH 21/36] be explicit --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27f2978d1f95..443f50bd6fb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,8 @@ jobs: run: npm install --production --prefix ./actions - name: Checkout Actions uses: actions/checkout@v3 + with: + repository: 'microsoft/vscode-python' - name: Lint uses: ./.github/actions/lint with: From 3bffbaeff73163a5996dda760cee89794b5b0cc9 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:20:21 -0700 Subject: [PATCH 22/36] us --- .github/workflows/codeql-analysis.yml | 68 --------------------------- 1 file changed, 68 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 278c2cf22e4a..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,68 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: 'CodeQL' - -on: - push: - branches: - - main - - release-* - - release/* - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - schedule: - - cron: '0 3 * * 0' - -permissions: - security-events: write - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['javascript', 'python'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - # uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 From 926d6f825b3988d19781ca9b56e324be1052826b Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:24:47 -0700 Subject: [PATCH 23/36] restore origna --- .github/actions/lint/action.yml | 49 +++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 9 ------ 2 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 .github/actions/lint/action.yml diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml new file mode 100644 index 000000000000..9478550c107b --- /dev/null +++ b/.github/actions/lint/action.yml @@ -0,0 +1,49 @@ +name: 'Lint' +description: 'Lint TypeScript and Python code' + +inputs: + node_version: + description: 'Version of Node to install' + required: true + +runs: + using: 'composite' + steps: + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node_version }} + cache: 'npm' + + - name: Install Node dependencies + run: npm ci --prefer-offline + shell: bash + + - name: Run `gulp prePublishNonBundle` + run: npx gulp prePublishNonBundle + shell: bash + + - name: Check dependencies + run: npm run checkDependencies + shell: bash + + - name: Lint TypeScript code + run: npm run lint + shell: bash + + - name: Check TypeScript format + run: npm run format-check + shell: bash + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + cache: 'pip' + + - name: Check Python format + run: | + python -m pip install -U black + python -m black . --check + working-directory: pythonFiles + shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 443f50bd6fb2..a563553b8e94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,15 +65,6 @@ jobs: steps: - name: Checkout Actions uses: actions/checkout@v3 - with: - repository: 'microsoft/vscode-python-engineering' - path: ./.github/actions - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: 'microsoft/vscode-python' - name: Lint uses: ./.github/actions/lint with: From bfd2e41c1d8ca328e1458aeecbead695dad49452 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:28:24 -0700 Subject: [PATCH 24/36] sdfsd --- .github/workflows/build.yml | 9 +++++++++ .github/workflows/pr-check.yml | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a563553b8e94..443f50bd6fb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,15 @@ jobs: steps: - name: Checkout Actions uses: actions/checkout@v3 + with: + repository: 'microsoft/vscode-python-engineering' + path: ./.github/actions + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Checkout Actions + uses: actions/checkout@v3 + with: + repository: 'microsoft/vscode-python' - name: Lint uses: ./.github/actions/lint with: diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 744ffda5eb7a..c89e2a8739e5 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -22,17 +22,20 @@ env: jobs: lint: name: Lint + if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: - name: Checkout Actions uses: actions/checkout@v3 with: repository: 'microsoft/vscode-python-engineering' - path: ./actions + path: ./.github/actions - name: Install Actions run: npm install --production --prefix ./actions + - name: Checkout Actions + uses: actions/checkout@v3 - name: Lint - uses: ./actions/lint + uses: ./.github/actions/lint with: node_version: ${{ env.NODE_VERSION }} From 929d209d587863a4d9cd10a7c546e4411b1497fd Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:30:33 -0700 Subject: [PATCH 25/36] asdsa --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index c89e2a8739e5..34d17ba2b718 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -21,7 +21,7 @@ env: jobs: lint: - name: Lint + name: Lintasd if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: From 6f0af1da9df4a9892136996ad1e4db80fc43e267 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:31:56 -0700 Subject: [PATCH 26/36] dsdsg --- .github/workflows/pr-check.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 34d17ba2b718..9b41f19111ae 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -29,13 +29,11 @@ jobs: uses: actions/checkout@v3 with: repository: 'microsoft/vscode-python-engineering' - path: ./.github/actions + path: ./actions - name: Install Actions run: npm install --production --prefix ./actions - - name: Checkout Actions - uses: actions/checkout@v3 - name: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} From 812157ed9f47f1b5cda6344b30b6f77510dccb5a Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:32:59 -0700 Subject: [PATCH 27/36] sdffd --- .github/workflows/build.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 443f50bd6fb2..3f50c4ae3c4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }} lint: - name: Lint + name: Lintasd if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: @@ -67,15 +67,11 @@ jobs: uses: actions/checkout@v3 with: repository: 'microsoft/vscode-python-engineering' - path: ./.github/actions + path: ./actions - name: Install Actions run: npm install --production --prefix ./actions - - name: Checkout Actions - uses: actions/checkout@v3 - with: - repository: 'microsoft/vscode-python' - name: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} From 1eadaea0450f9aa7c095aa8edbd4387d8325a354 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:34:10 -0700 Subject: [PATCH 28/36] dsfdsf --- .github/workflows/build.yml | 3 ++- .github/workflows/pr-check.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f50c4ae3c4b..5be77905be46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,6 @@ jobs: lint: name: Lintasd - if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: - name: Checkout Actions @@ -70,6 +69,8 @@ jobs: path: ./actions - name: Install Actions run: npm install --production --prefix ./actions + - name: Checkout Actions + uses: actions/checkout@v3 - name: Lint uses: ./actions/lint with: diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 9b41f19111ae..155dc61aaf33 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -22,7 +22,6 @@ env: jobs: lint: name: Lintasd - if: github.repository == 'microsoft/vscode-python' runs-on: ubuntu-latest steps: - name: Checkout Actions @@ -32,6 +31,8 @@ jobs: path: ./actions - name: Install Actions run: npm install --production --prefix ./actions + - name: Checkout Actions + uses: actions/checkout@v3 - name: Lint uses: ./actions/lint with: From 24bb2d826021a3217ca3f6d86621ebec3aac5838 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:37:38 -0700 Subject: [PATCH 29/36] sdfsdf --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 155dc61aaf33..654b8e5a694d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 - name: Lint - uses: ./actions/lint + uses: ./.github/actions/lint with: node_version: ${{ env.NODE_VERSION }} From 16c039ef01c3e47ebabf4d9befe9e45094c1a8b0 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:50:27 -0700 Subject: [PATCH 30/36] sdf --- .github/actions/lint/action.yml | 49 --------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 .github/actions/lint/action.yml diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml deleted file mode 100644 index 9478550c107b..000000000000 --- a/.github/actions/lint/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 'Lint' -description: 'Lint TypeScript and Python code' - -inputs: - node_version: - description: 'Version of Node to install' - required: true - -runs: - using: 'composite' - steps: - - name: Install Node - uses: actions/setup-node@v2 - with: - node-version: ${{ inputs.node_version }} - cache: 'npm' - - - name: Install Node dependencies - run: npm ci --prefer-offline - shell: bash - - - name: Run `gulp prePublishNonBundle` - run: npx gulp prePublishNonBundle - shell: bash - - - name: Check dependencies - run: npm run checkDependencies - shell: bash - - - name: Lint TypeScript code - run: npm run lint - shell: bash - - - name: Check TypeScript format - run: npm run format-check - shell: bash - - - name: Install Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - cache: 'pip' - - - name: Check Python format - run: | - python -m pip install -U black - python -m black . --check - working-directory: pythonFiles - shell: bash From d1e801973df8fed6b0bd8e2498158c55a4eae259 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:52:09 -0700 Subject: [PATCH 31/36] dsfdf --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 654b8e5a694d..155dc61aaf33 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout Actions uses: actions/checkout@v3 - name: Lint - uses: ./.github/actions/lint + uses: ./actions/lint with: node_version: ${{ env.NODE_VERSION }} From 0e93f2b27bfe4f95aa23a71d2711c5341980a269 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 00:53:08 -0700 Subject: [PATCH 32/36] dgfdg --- .github/workflows/pr-check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 155dc61aaf33..f2dedc36fe9b 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -31,8 +31,6 @@ jobs: path: ./actions - name: Install Actions run: npm install --production --prefix ./actions - - name: Checkout Actions - uses: actions/checkout@v3 - name: Lint uses: ./actions/lint with: From c42b22cff7325f9b29a2a70c0be2ca5feebac2b5 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 01:16:36 -0700 Subject: [PATCH 33/36] Okay Amen --- .github/workflows/pr-check.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index f2dedc36fe9b..a778b2f48de0 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -21,7 +21,7 @@ env: jobs: lint: - name: Lintasd + name: Lint runs-on: ubuntu-latest steps: - name: Checkout Actions @@ -29,8 +29,14 @@ jobs: with: repository: 'microsoft/vscode-python-engineering' path: ./actions - - name: Install Actions - run: npm install --production --prefix ./actions + - name: Copy folder to current repo + run: | + cp -r ./actions/lint . + git add lint + git commit -m "Add lint from another-repo" + - name: Checkout + uses: actions/checkout@v3 + - name: Lint uses: ./actions/lint with: From 3bdfcdf100dbc07b91c7d8c16aa0ff328392ce4e Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 01:17:58 -0700 Subject: [PATCH 34/36] asddsa --- .github/workflows/pr-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index a778b2f48de0..0b88c2114d44 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -24,6 +24,8 @@ jobs: name: Lint runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 - name: Checkout Actions uses: actions/checkout@v3 with: From d03ac2d74c663ab749af43bfcd71ec7d2a754f00 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 01:19:23 -0700 Subject: [PATCH 35/36] fdsadf --- .github/workflows/pr-check.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 0b88c2114d44..647a60f816a8 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -24,23 +24,21 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - name: Checkout Actions uses: actions/checkout@v3 with: repository: 'microsoft/vscode-python-engineering' - path: ./actions + path: . - name: Copy folder to current repo run: | - cp -r ./actions/lint . + cp -r ./lint . git add lint git commit -m "Add lint from another-repo" - name: Checkout uses: actions/checkout@v3 - name: Lint - uses: ./actions/lint + uses: ./lint with: node_version: ${{ env.NODE_VERSION }} From a017e096e0604fd6f5edfe21096e2c59a5e17f32 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Thu, 4 May 2023 01:21:43 -0700 Subject: [PATCH 36/36] sdfsdf --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 647a60f816a8..147be5bffd0c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -31,7 +31,7 @@ jobs: path: . - name: Copy folder to current repo run: | - cp -r ./lint . + cp -r ./lint/* . git add lint git commit -m "Add lint from another-repo" - name: Checkout