Skip to content

Commit e5f0179

Browse files
committed
fix: fix bug
1 parent f7ba9f6 commit e5f0179

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

dist/index.js

Lines changed: 3 additions & 5 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.

index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ async function run() {
1818
found = await SyncModel.findOne({})
1919
if (found.count == 0) {
2020
clearInterval(intervalId)
21+
found = await SyncModel.findOneAndUpdate({}, {count: found.count + 1}, {new: true})
22+
await standardVersion(getConfiguration());
23+
await SyncModel.findOneAndUpdate({}, {count: found.count - 1})
2124
}
2225
}, 1000);
23-
24-
found = await SyncModel.findOneAndUpdate({}, {count: found.count + 1})
25-
await standardVersion(getConfiguration());
26-
await SyncModel.findOneAndUpdate({}, {count: found.count - 1})
27-
2826
} catch (error) {
2927
core.setFailed(error.stack);
3028
}

0 commit comments

Comments
 (0)