feat: set up auto prs for snapshot metafile changes (#25052)

Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Ryan Manuel
2022-12-13 08:29:22 -06:00
committed by GitHub
parent 09d0879cab
commit 56bebb109e
36 changed files with 427 additions and 11003 deletions

View File

@@ -0,0 +1,24 @@
const createPullRequest = async ({ context, github, baseBranch, branchName, description, body, reviewers }) => {
const { data: { number } } = await github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
base: baseBranch,
head: branchName,
title: `chore: ${description}`,
body,
maintainer_can_modify: true,
})
if (reviewers) {
await github.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: number,
reviewers,
})
}
}
module.exports = {
createPullRequest,
}