generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efb72a7
commit e9470c8
Showing
6 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,24 +34,29 @@ jobs: | |
run: | | ||
if [[ "${{ env.PR_IS_DEPENDABOT }}" == "true" && "${{ env.PR_IS_PREFIXED }}" == "false" ]]; then | ||
echo "PR title should be updated." | ||
echo "PR_TITLE_SHOULD_BE_UPDATED=true" >> $GITHUB_ENV | ||
echo "PR_UPDATED_TITLE=Chore: [dependabot] - ${{ github.event.pull_request.title }}" >> $GITHUB_ENV | ||
else | ||
echo "PR title should not be updated." | ||
echo "No change to PR title." | ||
fi | ||
- name: Update PR title with Prefix | ||
if: env.PR_TITLE_SHOULD_BE_UPDATED == 'true' | ||
if: env.PR_UPDATED_TITLE | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const new_title = `Chore: [dependabot] - ${{ github.event.pull_request.title }}` | ||
console.log(`Updating PR title to: ${new_title}`) | ||
console.log(`Updating PR title to: ${{ env.PR_UPDATED_TITLE }}`) | ||
github.rest.pulls.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.issue.number, | ||
title: new_title | ||
title: ${{ env.PR_UPDATED_TITLE }} | ||
}) | ||
- name: Set Updated PR Title as Output | ||
if: env.PR_UPDATED_TITLE | ||
id: set_updated_pr_title_output | ||
run: | | ||
echo "::set-output name=updated_pr_title::${{ env.PR_UPDATED_TITLE }}" |