forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.77 KB
/
label-pr.yml
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
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# adds a label to a pull request if certain files are changed
name: Label Pull Requests
on:
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check for changed files
id: file_changes
uses: dorny/paths-filter@v2
with:
list-files: shell
filters: |
docsUpdateRequired:
- 'src/flagd/**'
helmUpdateRequired:
- '.env'
- 'docker-compose*.yml'
- 'src/flagd/**'
- 'src/grafana/**'
- 'src/otelcollector/**'
- 'src/prometheus/**'
- name: "Add Label: docs-update-required"
if: steps.file_changes.outputs.docsUpdateRequired == 'true'
uses: actions/github-script@v7
with:
script: |
const issue_number = context.issue.number;
github.rest.issues.addLabels({
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['docs-update-required']
})
- name: "Add Label: helm-update-required"
if: steps.file_changes.outputs.helmUpdateRequired == 'true'
uses: actions/github-script@v7
with:
script: |
const issue_number = context.issue.number;
github.rest.issues.addLabels({
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['helm-update-required']
})