@@ -6,51 +6,54 @@ name: PR Comment
66# DO NOT PULL THE PR OR EXECUTE ANY CODE FROM THE PR.
77
88on :
9- pull_request_target :
10- types : [opened, reopened, synchronize]
11- branches :
12- - main
9+ pull_request_target :
10+ types : [opened, reopened, synchronize]
11+ branches :
12+ - main
1313
1414jobs :
15- comment-on-pr :
16- runs-on : ubuntu-latest
17- permissions :
18- pull-requests : write
19-
20- steps :
21- - uses : actions/checkout@v4
22-
23- - name : Delete old comments
24- env :
25- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26- run : |
27- # Delete previous comment if it exists
28- previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
29- --jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
30- echo "Previous comment IDs: $previous_comment_ids"
31- # Iterate over each comment ID and delete the comment
32- if [ ! -z "$previous_comment_ids" ]; then
33- echo "$previous_comment_ids" | while read -r comment_id; do
34- echo "Deleting comment with ID: $comment_id"
35- gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
36- done
37- fi
38-
39- - name : Comment on PR
40- env :
41- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42- COMMIT_SHA : ${{ github.event.pull_request.head.sha }}
43- run : |
44- gh pr comment ${{ github.event.pull_request.number }} --body \
45- "<!-- INTEGRATION_TESTS_MANUAL -->
46- If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:
47-
48- Trigger:
49- [go/deco-tests-run/vscode](https://go/deco-tests-run/vscode)
50-
51- Inputs:
52- * PR number: ${{github.event.pull_request.number}}
53- * Commit SHA: \`${{ env.COMMIT_SHA }}\`
54-
55- Checks will be approved automatically on success.
56- "
15+ comment-on-pr :
16+ runs-on :
17+ group : databricks-deco-testing-runner-group
18+ labels : ubuntu-latest-deco
19+
20+ permissions :
21+ pull-requests : write
22+
23+ steps :
24+ - uses : actions/checkout@v4
25+
26+ - name : Delete old comments
27+ env :
28+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ run : |
30+ # Delete previous comment if it exists
31+ previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
32+ --jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
33+ echo "Previous comment IDs: $previous_comment_ids"
34+ # Iterate over each comment ID and delete the comment
35+ if [ ! -z "$previous_comment_ids" ]; then
36+ echo "$previous_comment_ids" | while read -r comment_id; do
37+ echo "Deleting comment with ID: $comment_id"
38+ gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
39+ done
40+ fi
41+
42+ - name : Comment on PR
43+ env :
44+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ COMMIT_SHA : ${{ github.event.pull_request.head.sha }}
46+ run : |
47+ gh pr comment ${{ github.event.pull_request.number }} --body \
48+ "<!-- INTEGRATION_TESTS_MANUAL -->
49+ If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:
50+
51+ Trigger:
52+ [go/deco-tests-run/vscode](https://go/deco-tests-run/vscode)
53+
54+ Inputs:
55+ * PR number: ${{github.event.pull_request.number}}
56+ * Commit SHA: \`${{ env.COMMIT_SHA }}\`
57+
58+ Checks will be approved automatically on success.
59+ "
0 commit comments