Skip to content

Commit

Permalink
Merge pull request #20 from insightsengineering/propagate-removal-of-…
Browse files Browse the repository at this point in the history
…old-templates
  • Loading branch information
walkowif authored Feb 9, 2024
2 parents 77ebec1 + 650cbf9 commit 3c35ff3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/cran-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ body:
git push origin release-candidate-vX.Y.Z`
```
#### Test the release
- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ body:
git push origin release-candidate-vX.Y.Z
```
#### Test the release
- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Execute UAT tests (Optional).
#### Validation loop
**Note:** This section is applicable only for regulatory packages.
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/propagate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
# <username-1>
# <username-2>
# ...

- name: teal.logger
files-to-propagate: '.github/ISSUE_TEMPLATE/release.yml .github/ISSUE_TEMPLATE/cran-release.yml'
- name: tern.mmrm
Expand Down Expand Up @@ -144,18 +145,26 @@ jobs:
echo "Copying origin-repo/$name to destination-repo/$name"
cp origin-repo/$name destination-repo/$name
done
# TODO remove this line
rm -f destination-repo/.github/ISSUE_TEMPLATE/release.yaml destination-repo/.github/ISSUE_TEMPLATE/cran-release.yaml
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[skip ci] Propagate files from ${{ github.repository }}'
file_pattern: ${{ matrix.repos.files-to-propagate }}
# TODO restore this pattern
# file_pattern: ${{ matrix.repos.files-to-propagate }}
file_pattern: '.github/ISSUE_TEMPLATE/*'
repository: destination-repo
commit_user_name: github-actions
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
branch: ${{ env.PR_BRANCH_NAME }}@${{ env.target_branch }}
create_branch: true

- name: Sleep to avoid rate limiting
run: sleep $((RANDOM % 20))
shell: bash

- name: Create and merge PR in ${{ matrix.repos.name }} repository
uses: actions/github-script@v7
with:
Expand Down Expand Up @@ -183,15 +192,14 @@ jobs:
if (create_new_pr) {
console.log("Creating a new PR");
const result2 = await github.rest.pulls.create({
title: 'Propagate files from ${{ github.repository }}',
title: '[skip actions] Propagate files from ${{ github.repository }}',
owner: repo_owner,
repo: repo_name,
head: '${{ env.PR_BRANCH_NAME }}@${{ env.target_branch }}',
base: '${{ env.target_branch }}',
body: [
'This PR has been automatically generated by the ',
'file propagation workflow from ${{ github.repository }}.',
'\n\nPlease review the changes.'
'file propagation workflow from ${{ github.repository }}.'
].join('')
});
// Assign reviewers to the PR.
Expand Down

0 comments on commit 3c35ff3

Please sign in to comment.