We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c382772 commit dd534ccCopy full SHA for dd534cc
src/index.js
@@ -7,24 +7,20 @@ async function run() {
7
8
const pullRequests = await getPrs()
9
10
-
11
- let lastMergeCommitSha
12
- for (let pull of pullRequests) {
13
- try {
+ try {
+ let lastMergeCommitSha
+ for (let pull of pullRequests) {
14
console.log(`Merging PR ${pull.number}`)
15
const { data } = await mergeBranchs(pull.head.ref)
16
17
console.log(`Successful merge PR ${pull.number}`);
18
19
lastMergeCommitSha = data.sha
20
- } finally {
21
- await deleteBranch(workBranchName)
22
}
+ await recreateDeployBranch(lastMergeCommitSha)
+ } finally {
+ await deleteBranch(workBranchName)
23
24
25
- await recreateDeployBranch(lastMergeCommitSha)
26
27
28
29
30
run()
0 commit comments