Skip to content
This repository was archived by the owner on Mar 22, 2020. It is now read-only.

Commit 4b1394f

Browse files
committed
up
1 parent 14754c4 commit 4b1394f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/sync.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,15 @@ ${tips}
130130

131131
try {
132132

133+
debug("Look for sync PRs");
133134

134135
let existingPrs = await octokitBot.search.issuesAndPullRequests({
135136
q: `type:pr Sync with upstream in:title is:open author:${config.botUser} repo:${config.org}/${langInfo.code}.${config.repoSuffix}`
136137
});
137138

138139
for(let existingPr of existingPrs.data.items) {
140+
debug("Delete PR " + existingPr.number);
141+
139142
await octokitBot.pulls.update({
140143
owner: config.org,
141144
repo: `${langInfo.code}.${config.repoSuffix}`,
@@ -144,6 +147,8 @@ ${tips}
144147
});
145148
}
146149

150+
debug("Create sync PR");
151+
147152
const { data: {number: pull_number} } = await octokitBot.pulls.create({
148153
owner: config.org,
149154
repo: `${langInfo.code}.${config.repoSuffix}`,

0 commit comments

Comments
 (0)