Skip to content

Commit a1f1e06

Browse files
committed
Add job to close stale PR
1 parent 8a04295 commit a1f1e06

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/dot-org-content.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ jobs:
4848
- name: Move the generated folder
4949
run: |
5050
mv dot-org-repo/libxslt-md/ ./content/nginx/
51+
52+
close-stale-PRs:
53+
name: Close any related stale PRs
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Check for any stale PRs
57+
id: check-stale-pr
58+
run: |
59+
60+
- name: Close relevant PR if any exists
61+
if: steps.check-stale-pr.outputs.IS_STALE_FOUND == 'true'
62+
run: |
63+
5164
5265
create-PR:
5366
name: Create PR in documentation repository
@@ -56,12 +69,13 @@ jobs:
5669
runs-on: ubuntu-latest
5770
steps:
5871
- name: Generate the PR
59-
uses: actions/github-script@v6
72+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
6073
with:
6174
script: |
6275
const { repo, owner } = context.repo;
76+
6377
const result = await github.rest.pulls.create({
64-
title: 'NGINX: Update content for content/nginx due to detected changes',
78+
title: 'NGINX Plus - Module Ref: Update content for content/nginx due to detected changes',
6579
owner,
6680
repo,
6781
head: '${{ github.ref_name }}',
@@ -71,4 +85,10 @@ jobs:
7185
'Updated NGINX Plus docs',
7286
].join('\n')
7387
});
74-
88+
89+
github.rest.issues.addLabels({
90+
owner,
91+
repo,
92+
issue_number: result.data.number,
93+
labels: ['product/nginx-plus', 'dependencies', 'module-reference']
94+
});

0 commit comments

Comments
 (0)