We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d130cf commit 14e1f57Copy full SHA for 14e1f57
scripts/sync-translations.js
@@ -204,14 +204,22 @@ async function createPullRequest({
204
auth: GITHUB_ACCESS_TOKEN,
205
previews: ["hellcat-preview"],
206
});
207
- await octokit.pulls.create({
208
- owner: GITHUB_ORG,
209
- repo: repoName,
210
- title,
211
- body,
212
- head: syncBranch,
213
- base: DEFAULT_BRANCH,
214
- });
+ try {
+ await octokit.pulls.create({
+ owner: GITHUB_ORG,
+ repo: repoName,
+ title,
+ body,
+ head: syncBranch,
+ base: DEFAULT_BRANCH,
215
+ });
216
+ } catch (e) {
217
+ if (typeof e.message === 'string' && e.message.includes('already exists')) {
218
+ // That's OK -- we already sent a PR for this hash.
219
+ return;
220
+ }
221
+ throw e;
222
223
}
224
225
async function execRead(command, options) {
0 commit comments