Skip to content

Commit 350c350

Browse files
authored
chore: replace local references to owner/repo (#520)
* replace local references to owner/repo with github.repository_owner and github.event.repository.name; if this doesn't work from forks, then we can hardcode the values Signed-off-by: Nick Boldt <[email protected]> * also fix paths to include release-1.* Signed-off-by: Nick Boldt <[email protected]> --------- Signed-off-by: Nick Boldt <[email protected]>
1 parent 1ed95d2 commit 350c350

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/build-asciidoc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- main
2222
- rhdh-1.**
2323
- 1.**.x
24-
- release-1.[0-9]+
24+
- release-1.**
2525

2626
jobs:
2727
adoc_build:

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- main
2828
- rhdh-1.**
2929
- 1.**.x
30-
- release-1.[0-9]+
30+
- release-1.**
3131

3232
concurrency:
3333
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
@@ -98,7 +98,7 @@ jobs:
9898
run: |
9999
PR_NUM="${{ github.event.number }}"
100100
# for a given PR, check for existing comments from rhdh-bot; select the last one (if more than one)
101-
if [[ $(gh api repos/{owner}/{repo}/issues/${PR_NUM}/comments | jq '.[]|select(.user.login=="rhdh-bot")|.id' | tail -1) ]]; then
101+
if [[ $(gh api repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/issues/${PR_NUM}/comments | jq '.[]|select(.user.login=="rhdh-bot")|.id' | tail -1) ]]; then
102102
# edit that comment:
103103
gh pr comment ${PR_NUM} --edit-last --body "Updated preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-${PR_NUM}/ @ $(date "+%x %X")"
104104
else

0 commit comments

Comments
 (0)