Skip to content

Commit bfa4704

Browse files
hugtalbotbakpaulepernod
authored
[GitHub] Update label name and rest API in Action pr-label-checker (#5717)
* Update pr-label-checker.yml * re-order flags * update API github.rest.* --------- Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Co-authored-by: erik pernod <erik.pernod@gmail.com>
1 parent 9de2f31 commit bfa4704

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/pr-label-checker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
3535
// Define an array of descriptive labels
3636
const descriptiveLabels = [
37-
'enhancement',
3837
'deprecated',
3938
'refactoring',
39+
'pr: enhancement',
4040
'pr: breaking',
4141
'pr: clean',
4242
'pr: fix',
@@ -52,7 +52,7 @@ jobs:
5252
// If no descriptive label is set, add a comment in the PR and make the action check fail
5353
if (!hasDescriptiveLabel) {
5454
const comment = ':warning: :warning: :warning:<br>@' + context.payload.pull_request.user.login + ' your PR does not include any **descriptive** label :label:<br> Make sure to add an appropriate [PR label](https://github.com/sofa-framework/sofa/labels) before merge.<br>:warning: :warning: :warning:';
55-
github.issues.createComment({
55+
github.rest.issues.createComment({
5656
issue_number: prNumber,
5757
owner: context.repo.owner,
5858
repo: context.repo.repo,
@@ -77,7 +77,7 @@ jobs:
7777
// If no descriptive label is set, add a comment in the PR and make the action check fail
7878
if (matchingLabelsCount === 0) {
7979
const comment = ':warning: :warning: :warning:<br>@'+context.repo.owner+' your PR does not include any **status** label :label:<br> Make sure to add one (wip, to review or ready).<br>:warning: :warning: :warning:';
80-
github.issues.createComment({
80+
github.rest.issues.createComment({
8181
issue_number: prNumber,
8282
owner: context.repo.owner,
8383
repo: context.repo.repo,
@@ -86,7 +86,7 @@ jobs:
8686
core.setFailed('Missing status PR label')
8787
} else if (matchingLabelsCount > 1) {
8888
const comment = ':warning: :warning: :warning:<br>@'+context.repo.owner+' your PR does includes **too many status labels** :label:<br> Make sure to keep only one (wip, to review or ready).<br>:warning: :warning: :warning:';
89-
github.issues.createComment({
89+
github.rest.issues.createComment({
9090
issue_number: prNumber,
9191
owner: context.repo.owner,
9292
repo: context.repo.repo,

0 commit comments

Comments
 (0)