-
Notifications
You must be signed in to change notification settings - Fork 1.7k
54 lines (44 loc) · 1.81 KB
/
pr-labels.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
name: PR Labels
on:
pull_request:
types: [labeled]
jobs:
crib:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Comment on PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const labelsToCheck = ["crib"];
const { owner, repo, number: prNumber } = context.issue;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({ owner, repo, issue_number: prNumber });
const labelMatches = labels.some(label => labelsToCheck.includes(label.name));
if (!labelMatches) {
core.info("No 'crib' PR label found. Proceeding.");
return;
}
const comment = `## CRIB Environment Details :information_source:
CRIB activated via the 'crib' label. To destroy the environment, remove the 'crib' PR label or close the PR.
Please review the following details:
### Subdomains
_Use these subdomains to access the CRIB environment. They are prefixes to the internal base domain._
- crib-chainlink-${prNumber}-node1.
- crib-chainlink-${prNumber}-node2.
- crib-chainlink-${prNumber}-node3.
- crib-chainlink-${prNumber}-node4.
- crib-chainlink-${prNumber}-node5.
- crib-chainlink-${prNumber}-node6.
- crib-chainlink-${prNumber}-geth-http.
- crib-chainlink-${prNumber}-geth-ws.
- crib-chainlink-${prNumber}-mockserver.
`;
await github.rest.issues.createComment({
owner,
repo,
issue_number: prNumber,
body: comment
});