Skip to content

Commit f3f2fef

Browse files
wip
1 parent fd1c259 commit f3f2fef

4 files changed

Lines changed: 23 additions & 23 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# General: "robot-test-needed" and "robot-test-done" should be the default values of two inputs.
2-
# 1. It should check if "robot-test-needed" label is present.
3-
# 2. It should check if "robot-test-done" label is present.
4-
# 3. If "robot-test-needed" is present and "robot-test-done" is not present, it should fail with an error message saying "PR needs robot testing but is not marked as robot-test-done."
1+
# General: "test-robot-needed" and "test-robot-done" should be the default values of two inputs.
2+
# 1. It should check if "test-robot-needed" label is present.
3+
# 2. It should check if "test-robot-done" label is present.
4+
# 3. If "test-robot-needed" is present and "test-robot-done" is not present, it should fail with an error message saying "PR needs robot testing but is not marked as test-robot-done."

.github/actions/test-label/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: "Test Label"
2-
description: "Checks if the robot-test-done label is present on the PR and adds a confirming comment."
2+
description: "Checks if the test-robot-done label is present on the PR and adds a confirming comment."
33

44
inputs:
5-
label-robot-test-done:
6-
description: 'Label name indicating the PR has been robot-test-done'
5+
label-test-robot-done:
6+
description: 'Label name indicating the PR has been test-robot-done'
77
required: false
8-
default: 'robot-test-done'
8+
default: 'test-robot-done'
99

1010
runs:
1111
using: "composite"
1212
steps:
13-
- name: Check robot-test-done label and add comment
13+
- name: Check test-robot-done label and add comment
1414
shell: bash
1515
env:
1616
GH_TOKEN: ${{ github.token }}
1717
PR_NUMBER: ${{ github.event.pull_request.number }}
1818
REPO: ${{ github.repository }}
1919
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
20-
LABEL_ROBOT_TESTED: ${{ inputs.label-robot-test-done }}
20+
LABEL_ROBOT_TESTED: ${{ inputs.label-test-robot-done }}
2121
run: |
2222
LABELS=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json labels --jq '.labels[].name')
2323

.github/actions/test-unlabel/action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
name: "Test Unlabel"
2-
description: "Removes the robot-test-done label from the PR if present and adds a comment."
2+
description: "Removes the test-robot-done label from the PR if present and adds a comment."
33

44
inputs:
5-
label-robot-test-needed:
5+
label-test-robot-needed:
66
description: 'Label name indicating the PR needs robot testing'
77
required: false
8-
default: 'robot-test-needed'
9-
label-robot-test-done:
10-
description: 'Label name indicating the PR has been robot-test-done'
8+
default: 'test-robot-needed'
9+
label-test-robot-done:
10+
description: 'Label name indicating the PR has been test-robot-done'
1111
required: false
12-
default: 'robot-test-done'
12+
default: 'test-robot-done'
1313

1414
runs:
1515
using: "composite"
1616
steps:
17-
- name: Remove robot-test-done label and add comment
17+
- name: Remove test-robot-done label and add comment
1818
shell: bash
1919
env:
2020
GH_TOKEN: ${{ github.token }}
2121
PR_NUMBER: ${{ github.event.pull_request.number }}
2222
REPO: ${{ github.repository }}
2323
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
24-
LABEL_ROBOT_TESTED: ${{ inputs.label-robot-test-done }}
25-
LABEL_ROBOT_TEST_NEEDED: ${{ inputs.label-robot-test-needed }}
24+
LABEL_ROBOT_TESTED: ${{ inputs.label-test-robot-done }}
25+
LABEL_ROBOT_TEST_NEEDED: ${{ inputs.label-test-robot-needed }}
2626
run: |
2727
LABELS=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json labels --jq '.labels[].name')
2828

.github/workflows/pull-request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
test-label:
18-
if: github.event.label.name == 'robot-test-done'
18+
if: github.event.label.name == 'test-robot-done'
1919
name: Test Label
2020
runs-on: ubuntu-latest
2121
steps:
@@ -24,7 +24,7 @@ jobs:
2424
- name: Test Label Added
2525
uses: ./.github/actions/test-unlabel
2626
with:
27-
label-robot-test-done: robot-test-done
27+
label-test-robot-done: test-robot-done
2828

2929
test-unlabel:
3030
if: github.event.action == 'synchronize'
@@ -36,8 +36,8 @@ jobs:
3636
- name: Remove Test Label
3737
uses: ./.github/actions/test-label
3838
with:
39-
label-robot-test-done: robot-test-done
40-
label-robot-test-needed: robot-test-needed
39+
label-test-robot-done: test-robot-done
40+
label-test-robot-needed: test-robot-needed
4141

4242
build:
4343
needs: test-unlabel

0 commit comments

Comments
 (0)