Skip to content

Commit c87343f

Browse files
authored
chore: cherrypick changes in main to the release-1.3 branch (#524)
Signed-off-by: Nick Boldt <nboldt@redhat.com>
1 parent 518f65c commit c87343f

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
<!--- If your changes apply to the latest released and/or in-development version of RHDH, open your PR against the `main` branch and cherrypick your PR to any released branches that you want to apply your changes to. --->
44

5+
**IMPORTANT: Do Not Merge - To be merged by Docs Team Only**
6+
57
**Version(s):**
68
<!--- Specify the version(s) of RHDH that your PR applies to. -->
79

@@ -15,6 +17,7 @@
1517
- [ ] SME: @ mention assignee
1618
- [ ] QE: @ mention assignee
1719
- [ ] Docs review: @ mention assignee
20+
- [ ] Additional review: @mention assignee (by writer)
1821
<!--- SME approval is required to merge a PR unless the changes are made by a subject matter expert. --->
1922
<!--- QE approval is required to merge a PR unless there are no technical changes to the content. --->
2023
<!--- Docs team approval is required for ALL PRs. --->

.github/workflows/build-asciidoc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
- main
2222
- rhdh-1.**
2323
- 1.**.x
24+
- release-1.**
2425

2526
jobs:
2627
adoc_build:

.github/workflows/pr.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
- main
2828
- rhdh-1.**
2929
- 1.**.x
30+
- release-1.**
3031

3132
concurrency:
3233
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
@@ -90,14 +91,19 @@ jobs:
9091
keep_files: true
9192
publish_dir: ./titles-generated
9293

93-
- name: PR comment with doc preview
94-
uses: actions/github-script@v7
95-
with:
96-
github-token: ${{ secrets.RHDH_BOT_TOKEN }}
97-
script: |
98-
github.rest.issues.createComment({
99-
issue_number: context.issue.number,
100-
owner: context.repo.owner,
101-
repo: context.repo.repo,
102-
body: 'PR Preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-${{ github.event.number }}/'
103-
});
94+
- name: PR comment with doc preview, replacing existing comments with a new one each time
95+
shell: bash
96+
env:
97+
GH_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }}
98+
run: |
99+
PR_NUM="${{ github.event.number }}"
100+
ORG_REPO="${{ github.repository_owner }}/${{ github.event.repository.name }}"
101+
gh repo set-default "${ORG_REPO}"
102+
# for a given PR, check for existing comments from rhdh-bot; select the last one (if more than one)
103+
if [[ $(gh api "repos/${ORG_REPO}/issues/${PR_NUM}/comments" -q 'map(select(.user.login=="rhdh-bot"))|last|.id') ]]; then
104+
# edit that comment:
105+
gh pr comment ${PR_NUM} -R "${ORG_REPO}" --edit-last --body "Updated preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-${PR_NUM}/ @ $(date "+%x %X")"
106+
else
107+
# or create a new one:
108+
gh pr comment ${PR_NUM} -R "${ORG_REPO}" --body "Preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-${PR_NUM}/"
109+
fi

modules/dynamic-plugins/rhdh-supported-plugins.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# script to generate rhdh-supported-plugins.adoc from content in
3+
# script to generate rhdh-supported-plugins.adoc from content in
44
# https://github.com/janus-idp/backstage-plugins/tree/main/plugins/ */package.json
55
# https://github.com/janus-idp/backstage-showcase/tree/main/dynamic-plugins/wrappers/ */json
66

0 commit comments

Comments
 (0)