forked from DataDog/integrations-core
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (60 loc) · 2.74 KB
/
Copy pathvalidate-skip-qa.yml
File metadata and controls
75 lines (60 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: 'Validate skip QA label'
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- master
jobs:
validate-skip-qa:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get files changed
id: changed_files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
**/datadog_checks/**
**/changelog.d/**
**/pyproject.toml
**/hatch.toml
files_ignore: |
ddev/**
datadog_checks_dev/**
datadog_checks_tests_helper/**
- name: Post message - Add skip qa label
if: steps.changed_files.outputs.any_changed == 'false' && !contains(github.event.pull_request.labels.*.name, 'qa/skip-qa')
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
⚠️ **Recommendation: Add `qa/skip-qa` Label**
This PR does not modify any files shipped with the agent.
To help streamline the release process, please consider adding the `qa/skip-qa` label if these changes do not require QA testing.
- name: Format file list for comment
id: format_files
if: steps.changed_files.outputs.any_changed == 'true'
run: |
formatted_list=$(echo "${{ steps.changed_files.outputs.all_changed_files }}" | tr ' ' '\n')
echo "file_list<<EOF" >> $GITHUB_OUTPUT
echo "$formatted_list" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Post comment - Remove skip qa label
if: steps.changed_files.outputs.any_changed == 'true' && contains(github.event.pull_request.labels.*.name, 'qa/skip-qa')
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
⚠️ **The `qa/skip-qa` label has been added with shippable changes**
The following files, which will be shipped with the agent, were modified in this PR and
the `qa/skip-qa` label has been added.
You can ignore this if you are sure the changes in this PR do not require QA. Otherwise, consider removing the label.
<details>
<summary>List of modified files that will be shipped with the agent</summary>
```
${{ steps.format_files.outputs.file_list }}
```
</details>