-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix New Relic heroku start command (#367) * Add create-release-pr workflow (#368) --------- Co-authored-by: Anna Hughes <[email protected]>
- Loading branch information
1 parent
799df82
commit 2c391b4
Showing
2 changed files
with
39 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Create release PR | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
create-pr-to-main: | ||
name: Create release PR to main | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Pull Request | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const pullRequestResponse = await github.rest.pulls.list({ | ||
owner, | ||
repo, | ||
base: 'main' | ||
}); | ||
if (pullRequestResponse.status === 200 && pullRequestResponse.data.length === 0) { | ||
const result = await github.rest.pulls.create({ | ||
title: 'Merge Develop onto Main', | ||
owner, | ||
repo, | ||
head: 'develop', | ||
base: 'main', | ||
body: [ | ||
'This PR was auto-generated - see create-release-pr.yml and ', | ||
'[actions/github-script](https://github.com/actions/github-script).', | ||
'Merging this PR will trigger an automatic deployment to production on Heroku.' | ||
].join('\n') | ||
}); | ||
} |
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