Skip to content

Commit 7a97e51

Browse files
committed
test
1 parent 56c7572 commit 7a97e51

1 file changed

Lines changed: 72 additions & 58 deletions

File tree

.github/workflows/validate.yaml

Lines changed: 72 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,83 @@
1-
name: Validate and Run Commands Based on PR Labels
1+
name: 'PR Review Comment'
22

3-
on:
4-
pull_request:
5-
types: [opened, synchronize, labeled, unlabeled]
3+
on: pull_request_review_comment
64

75
jobs:
8-
validate-and-execute:
6+
upload_payload:
7+
name: Upload payload
98
runs-on: ubuntu-latest
10-
119
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v3
14-
15-
# - name: Get PR Labels
16-
# id: get-labels
17-
# uses: actions/github-script@v6
18-
# with:
19-
# script: |
20-
# const labels = context.payload.pull_request.labels.map(label => label.name);
21-
# return labels;
22-
# result-encoding: string
23-
24-
# - name: Determine Validation Type
25-
# id: determine-validation-mode
26-
# run: |
27-
# labels="${{ steps.get-labels.outputs.result }}"
28-
29-
# validation_mode="thorough"
30-
# if echo "$labels" | grep -q "quick validation"; then
31-
# validation_mode="individual"
32-
# fi
33-
34-
# echo "validation_mode=$validation_mode" | tee -a $GITHUB_OUTPUT
35-
36-
# # Validate source and trigger test, skipping if there are no deployable changes
37-
# - name: 'If deployable changes were made, push source to a scratch org'
38-
# run: |
39-
# labels="${{ steps.get-labels.outputs.result }}"
40-
41-
# validation_mode="thorough"
42-
# if echo "$labels" | grep -q "quick validation"; then
43-
# validation_mode="individual"
44-
# fi
45-
# echo $validation_mode
46-
47-
- name: Get SFP Pool Validation Mode from the PR labels
48-
id: sfp-validation-mode
49-
uses: actions/github-script@v7
10+
- uses: actions/upload-artifact@v3
5011
with:
51-
script: |
12+
name: payload
13+
path: ${{ github.event_path }}
14+
15+
# name: Validate and Run Commands Based on PR Labels
16+
17+
# on:
18+
# pull_request:
19+
# types: [opened, synchronize, labeled, unlabeled]
20+
21+
# jobs:
22+
# validate-and-execute:
23+
# runs-on: ubuntu-latest
24+
25+
# steps:
26+
# - name: Checkout code
27+
# uses: actions/checkout@v3
28+
29+
# # - name: Get PR Labels
30+
# # id: get-labels
31+
# # uses: actions/github-script@v6
32+
# # with:
33+
# # script: |
34+
# # const labels = context.payload.pull_request.labels.map(label => label.name);
35+
# # return labels;
36+
# # result-encoding: string
37+
38+
# # - name: Determine Validation Type
39+
# # id: determine-validation-mode
40+
# # run: |
41+
# # labels="${{ steps.get-labels.outputs.result }}"
42+
43+
# # validation_mode="thorough"
44+
# # if echo "$labels" | grep -q "quick validation"; then
45+
# # validation_mode="individual"
46+
# # fi
47+
48+
# # echo "validation_mode=$validation_mode" | tee -a $GITHUB_OUTPUT
49+
50+
# # # Validate source and trigger test, skipping if there are no deployable changes
51+
# # - name: 'If deployable changes were made, push source to a scratch org'
52+
# # run: |
53+
# # labels="${{ steps.get-labels.outputs.result }}"
54+
55+
# # validation_mode="thorough"
56+
# # if echo "$labels" | grep -q "quick validation"; then
57+
# # validation_mode="individual"
58+
# # fi
59+
# # echo $validation_mode
60+
61+
# - name: Get SFP Pool Validation Mode from the PR labels
62+
# id: sfp-validation-mode
63+
# uses: actions/github-script@v7
64+
# with:
65+
# script: |
5266

53-
const labels = context.payload.pull_request.labels.map(label => label.name);
54-
const hasQuickValidation = labels.includes('quick validation');
55-
const hasFullValidation = labels.includes('full validation');
67+
# const labels = context.payload.pull_request.labels.map(label => label.name);
68+
# const hasQuickValidation = labels.includes('quick validation');
69+
# const hasFullValidation = labels.includes('full validation');
5670

57-
let validationMode = 'thorough';
71+
# let validationMode = 'thorough';
5872

59-
if (hasQuickValidation && !hasFullValidation) {
60-
validationMode = 'individual';
61-
}
73+
# if (hasQuickValidation && !hasFullValidation) {
74+
# validationMode = 'individual';
75+
# }
6276

63-
console.log(`SFP Validation Mode: ${validationMode}`);
64-
return validationMode;
65-
result-encoding: string
77+
# console.log(`SFP Validation Mode: ${validationMode}`);
78+
# return validationMode;
79+
# result-encoding: string
6680

67-
- name: Run Commands Based on the Validation Mode
68-
run: |
69-
echo "Running commands based on the validation mode: ${{ steps.sfp-validation-mode.outputs.result }}"
81+
# - name: Run Commands Based on the Validation Mode
82+
# run: |
83+
# echo "Running commands based on the validation mode: ${{ steps.sfp-validation-mode.outputs.result }}"

0 commit comments

Comments
 (0)