adding automatic sync back to main from the release branch
- is a PR to catch merge conflicts
This commit is contained in:
parent
53dd303553
commit
ebfcd1f058
|
@ -22,14 +22,25 @@ export const startReleaseProcess = async ({ github, context, core }) => {
|
|||
}
|
||||
|
||||
export const publishRelease = async (github, artifacts) => {
|
||||
const versionFile = await readVersionFile(github, "release")
|
||||
const versionFile = await readVersionFile(github, config.rcMergesTo)
|
||||
await release(
|
||||
github,
|
||||
versionFile.content,
|
||||
config.packageName,
|
||||
artifacts,
|
||||
config,
|
||||
).catch((error) => console.log(error))
|
||||
)
|
||||
|
||||
const createdPr = await github.rest.pulls.create({
|
||||
owner: config.owner,
|
||||
repo: config.repo,
|
||||
title: "[Auto] Sync Release",
|
||||
head: config.rcMergesTo,
|
||||
base: config.rcBranchesFrom,
|
||||
body: "Syncing changes from release",
|
||||
})
|
||||
|
||||
await enablePrAutoMerge(createdPr.data.node_id)
|
||||
}
|
||||
|
||||
const isWorkingBranchAhead = async (github) => {
|
||||
|
@ -77,7 +88,11 @@ const startRelease = async (github) => {
|
|||
body: "todo",
|
||||
})
|
||||
|
||||
github.graphql(
|
||||
await enablePrAutoMerge(createdPr.data.node_id)
|
||||
}
|
||||
|
||||
const enablePrAutoMerge = async (prNodeId) => {
|
||||
await github.graphql(
|
||||
`
|
||||
mutation ($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) {
|
||||
enablePullRequestAutoMerge(input: {
|
||||
|
@ -96,7 +111,7 @@ const startRelease = async (github) => {
|
|||
}
|
||||
`,
|
||||
{
|
||||
pullRequestId: createdPr.data.node_id,
|
||||
pullRequestId: prNodeId,
|
||||
mergeMethod: "MERGE"
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue