-
Notifications
You must be signed in to change notification settings - Fork 84
120 lines (108 loc) · 3.47 KB
/
pull-request.yml
File metadata and controls
120 lines (108 loc) · 3.47 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Pull Request Checks
on:
pull_request:
paths-ignore:
- "CHANGELOG.adoc"
- "README.adoc"
- "doc/**"
types:
[
opened,
synchronize,
reopened,
labeled,
unlabeled,
milestoned,
demilestoned,
]
jobs:
build:
name: Metadata Review
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node SDK
uses: actions/setup-node@v4
with:
node-version: 22.16
registry-url: https://npm.pkg.github.com/
- name: Check that the CHANGELOG has been updated
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-changelog.js
- name: Check that the copyright of the modified files has been updated
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-copyright.js
- name: Check that the labels of the pull request are ok
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-labels.js
- name: Check that the milestone of the pull request is ok
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-milestone.js
- name: Retrieve PR metadata
uses: octokit/graphql-action@abaeca7ba4f0325d63b8de7ef943c2418d161b93
id: pr-metadata
with:
query: |
query getPullRequestMetadata($owner: String!, $repository: String!, $prNumber: Int!) {
repository(owner: $owner, name: $repository) {
pullRequest(number: $prNumber) {
title
milestone {
title
}
projectsV2(first: 5) {
nodes {
title
}
}
closingIssuesReferences(first: 10) {
nodes {
title
number
labels(first: 10) {
nodes {
name
}
}
milestone {
title
}
projectsV2(first: 5) {
nodes {
title
}
}
}
}
}
}
}
variables: |
owner: ${{ github.event.repository.owner.login }}
repository: ${{ github.event.repository.name }}
prNumber: ${{ github.event.pull_request.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check additional metadata of the pull request
env:
PAYLOAD: ${{ steps.pr-metadata.outputs.data }}
run: node scripts/check-pr.js
- name: Check that the TypeScript files do not have an issue
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-ts.js
- name: Check that the frontend dependencies are ok
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-frontend-dependencies.js
- name: Check that the frontend extension points are ok
env:
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: node scripts/check-extension-points.js