Skip to content

Commit

Permalink
Merge Develop onto Main (#369)
Browse files Browse the repository at this point in the history
* Fix New Relic heroku start command (#367)

* Add create-release-pr workflow (#368)

---------

Co-authored-by: Anna Hughes <[email protected]>
  • Loading branch information
github-actions[bot] and annarhughes authored Jan 8, 2024
1 parent 799df82 commit 2c391b4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/create-release-pr.yml
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')
});
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"prebuild": "rimraf dist",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start --exec 'node -r newrelic'",
"start": "nest start",
"start:dev": "NODE_ENV=development nest start --watch",
"start:stag": "NODE_ENV=staging nest start --watch",
"start:debug": "NODE_ENV=development nest start --debug --watch",
"start:prod": "NODE_ENV=production node dist/src/main",
"start:heroku": "node dist/src/main --optimize_for_size --max_old_space_size=460 --gc_interval=100",
"start:heroku": "node -r newrelic dist/src/main --optimize_for_size --max_old_space_size=460 --gc_interval=100",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "NODE_ENV=test jest",
"test:watch": "NODE_ENV=test jest --watch",
Expand Down

0 comments on commit 2c391b4

Please sign in to comment.