Skip to content

Commit

Permalink
Refactor version packages label adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye-31 committed Sep 11, 2022
1 parent b2559ef commit 410082a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
13 changes: 13 additions & 0 deletions .github/gh-label.cjs
@@ -0,0 +1,13 @@
const { execSync } = require("child_process");

const res = execSync("gh pr status --json title -q .currentBranch.title")
.toString()
.trim();
const title = "Version Packages";

if (res === title) {
console.log("Adding label 'version-packages'");
execSync('gh pr edit --add-label "Version Packages"');
} else {
console.log("No version packages PR");
}
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -43,3 +43,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Add label
run: node ./.github/gh-label.cjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/versionPackagesLabel.yml

This file was deleted.

0 comments on commit 410082a

Please sign in to comment.