Skip to content

Commit 3f9c14e

Browse files
Merge pull request #63 from tharapalanivel/main
fix: Fix labelpr workflow
2 parents 78a4820 + e53a047 commit 3f9c14e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

.github/workflows/labelpr.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ jobs:
1212
with:
1313
github-token: ${{ secrets.GITHUB_TOKEN }}
1414
script: |
15-
const pr_welcome_msg = `Thanks for making a pull request! 😃\nOne of the maintainers will review and advise on the next steps.`;
1615
// https://github.com/commitizen/conventional-commit-types
1716
const valid_pr_types = ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert'];
1817
19-
if(context.payload.pull_request.comments === 0) {
20-
await github.issues.createComment({ ...context.repo, issue_number: context.payload.number, body: pr_welcome_msg});
21-
}
2218
2319
const title = context.payload.pull_request.title;
2420
const results = /^(\w+)(\(\w+\))?!?:/.exec(title);
@@ -32,4 +28,4 @@ jobs:
3228
const labels = context.payload.pull_request.labels;
3329
const new_labels = labels.filter(label => !valid_pr_types.includes(label.name)); // keep all labels that are not in valid_pr_types
3430
new_labels.push({name: pr_type});
35-
await github.issues.update({ ...context.repo, issue_number: context.payload.number, labels: new_labels });
31+
await github.rest.issues.update({ ...context.repo, issue_number: context.payload.number, labels: new_labels });

0 commit comments

Comments
 (0)