diff --git a/.github/workflows/labelpr.yaml b/.github/workflows/labelpr.yaml index 14d6f226..5e69329b 100644 --- a/.github/workflows/labelpr.yaml +++ b/.github/workflows/labelpr.yaml @@ -12,13 +12,9 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const pr_welcome_msg = `Thanks for making a pull request! 😃\nOne of the maintainers will review and advise on the next steps.`; // https://github.com/commitizen/conventional-commit-types const valid_pr_types = ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert']; - if(context.payload.pull_request.comments === 0) { - await github.issues.createComment({ ...context.repo, issue_number: context.payload.number, body: pr_welcome_msg}); - } const title = context.payload.pull_request.title; const results = /^(\w+)(\(\w+\))?!?:/.exec(title); @@ -32,4 +28,4 @@ jobs: const labels = context.payload.pull_request.labels; const new_labels = labels.filter(label => !valid_pr_types.includes(label.name)); // keep all labels that are not in valid_pr_types new_labels.push({name: pr_type}); - await github.issues.update({ ...context.repo, issue_number: context.payload.number, labels: new_labels }); \ No newline at end of file + await github.rest.issues.update({ ...context.repo, issue_number: context.payload.number, labels: new_labels }); \ No newline at end of file