From 51402c94d7941a5c9a96255d22eec1efb309446f Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Mon, 18 Sep 2023 10:05:30 -0700 Subject: [PATCH 1/2] Remove repo labels corresponding to removing unrecognized label workflow --- .github/workflows/getLabels.js | 25 ------------------------- .github/workflows/issue-labels.yml | 7 ++----- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/getLabels.js diff --git a/.github/workflows/getLabels.js b/.github/workflows/getLabels.js deleted file mode 100644 index 99060e7205eb..000000000000 --- a/.github/workflows/getLabels.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * To run this file: - * * npm install @octokit/rest - * * node .github/workflows/getLabels.js - * - * This script assumes the maximum number of labels to be 100. - */ - -const { Octokit } = require('@octokit/rest'); -const github = new Octokit(); -github.rest.issues - .listLabelsForRepo({ - owner: 'microsoft', - repo: 'vscode-python', - per_page: 100, - }) - .then((result) => { - const labels = result.data.map((label) => label.name); - console.log( - '\nNumber of labels found:', - labels.length, - ", verify that it's the same as number of labels listed in https://github.com/microsoft/vscode-python/labels\n", - ); - console.log(JSON.stringify(labels), '\n'); - }); diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml index 7817ed62bd9b..8b084aef409f 100644 --- a/.github/workflows/issue-labels.yml +++ b/.github/workflows/issue-labels.yml @@ -5,8 +5,6 @@ on: types: [opened, reopened] env: - # To update the list of labels, see `getLabels.js`. - REPO_LABELS: '["area-api","area-data science","area-debugging","area-diagnostics","area-editor-*","area-environments","area-formatting","area-intellisense","area-internal","area-linting","area-repl","area-terminal","area-testing","author-verification-requested","bug","community ask","debt","dependencies","documentation","experimenting","feature-request","good first issue","help wanted","important","info-needed","invalid-testplan-item","investigating","iteration-candidate","iteration-plan","iteration-plan-draft","javascript","linux","macos","meta","needs community feedback","needs PR","needs proposal","needs spike","no-changelog","on-testplan","partner ask","regression","release-plan","reports-wanted","skip package*.json","skip tests","tensorboard","testplan-item","triage-needed","verification-found","verification-needed","verification-steps-needed","verified","windows"]' TRIAGERS: '["karrtikr","karthiknadig","paulacamargo25","eleanorjboyd","anthonykim1"]' permissions: @@ -15,7 +13,7 @@ permissions: jobs: # From https://github.com/marketplace/actions/github-script#apply-a-label-to-an-issue. add-classify-label: - name: "Add 'triage-needed' and remove unrecognizable labels & assignees" + name: "Add 'triage-needed' and remove assignees" runs-on: ubuntu-latest steps: - name: Checkout Actions @@ -28,9 +26,8 @@ jobs: - name: Install Actions run: npm install --production --prefix ./actions - - name: "Add 'triage-needed' and remove unrecognizable labels & assignees" + - name: "Add 'triage-needed' and remove assignees" uses: ./actions/python-issue-labels with: triagers: ${{ env.TRIAGERS }} token: ${{secrets.GITHUB_TOKEN}} - repo_labels: ${{ env.REPO_LABELS }} From 9ab5bebba67696ad8e396b3a0513c32fda70fed8 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Mon, 18 Sep 2023 10:06:25 -0700 Subject: [PATCH 2/2] Always commit to new branch --- .vscode/settings.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 06011b3d13cd..a5dbb4869fd9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -67,12 +67,10 @@ "typescript.preferences.importModuleSpecifier": "relative", "debug.javascript.usePreview": false, // Branch name suggestion. + "git.branchProtectionPrompt": "alwaysCommitToNewBranch", "git.branchRandomName.enable": true, - "git.branchProtection": [ - "main", - "release/*" - ], + "git.branchProtection": ["main", "release/*"], "git.pullBeforeCheckout": true, // Open merge editor for resolving conflicts. - "git.mergeEditor": true, + "git.mergeEditor": true }