Skip to content

Commit eebeaac

Browse files
authored
Merge pull request #217 from lcdsmao/fix-body-after-error
fix: update issue body when error
2 parents 1b88a71 + 26367ee commit eebeaac

File tree

3 files changed

+53
-46
lines changed

3 files changed

+53
-46
lines changed

dist/index.js

Lines changed: 45 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ async function run(): Promise<void> {
7272
editing: true
7373
})
7474

75-
let newIssueBody: RecordBody = {editing: false}
75+
let newRecordBody: RecordBody = {...recordBody, editing: false}
7676
try {
77-
newIssueBody = await maybeUpdateBranchAndMerge(ctx, recordBody, condition)
77+
newRecordBody = await maybeUpdateBranchAndMerge(
78+
ctx,
79+
recordBody,
80+
condition
81+
)
7882
} finally {
79-
await updateRecordIssueBody(ctx, recordIssue, newIssueBody)
83+
await updateRecordIssueBody(ctx, recordIssue, newRecordBody)
8084
}
8185
} catch (error) {
8286
if (error instanceof Error) {

0 commit comments

Comments
 (0)