Skip to content

Commit 3c9eab4

Browse files
authored
Merge pull request #3124 from Shopify/andy-chhuon/16680-version-doc-reminder
16680: add version doc reminder workflow
2 parents 8bc64d5 + 22c4e65 commit 3c9eab4

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: POS Version Doc Reminder
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
branches:
7+
- 2023-04
8+
- 2023-07
9+
- 2023-10
10+
- 2024-01
11+
- 2024-04
12+
- 2024-07
13+
- 2024-10
14+
- unstable
15+
- 20[0-9][0-9]-[01][1470]
16+
paths:
17+
- 'packages/ui-extensions/src/surfaces/point-of-sale/**'
18+
- 'packages/ui-extensions-react/src/surfaces/point-of-sale/**'
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
check-version-doc:
26+
name: Check POS Version Documentation
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 2
29+
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'changeset-release/') }}
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Verify if POS version doc was updated
34+
id: changed-files-version-doc
35+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
36+
with:
37+
files: |
38+
packages/ui-extensions/docs/surfaces/point-of-sale/staticPages/pages/versions.doc.ts
39+
40+
- name: Check if version doc needs updating
41+
if: steps.changed-files-version-doc.outputs.any_changed == 'false'
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
43+
with:
44+
script: |
45+
const comment = `## 📝 POS Version Documentation Reminder
46+
47+
We detected changes in \`packages/*/src/surfaces/point-of-sale\`, but there are no updates to the POS versions documentation.
48+
49+
If these changes are user-facing and should be documented in the version changelog, please update:
50+
\`packages/ui-extensions/docs/surfaces/point-of-sale/staticPages/pages/versions.doc.ts\`
51+
52+
If you are making internal changes that don't affect the public API, you can ignore this reminder.`;
53+
54+
// Post a comment on the PR
55+
await github.rest.issues.createComment({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
issue_number: context.issue.number,
59+
body: comment
60+
});

0 commit comments

Comments
 (0)