Tool: Workaround for mergefreeze API (#6908)

A timeboxed workaround for an intermittent issue where the mergefreeze API reports that a repo is frozen: false, when the mergefreeze UI says that it is actually truly frozen.
This commit is contained in:
Mike McNeil
2022-07-27 01:41:57 -05:00
committed by GitHub
parent c5adb912f9
commit ff116226a7
+6 -1
View File
@@ -242,7 +242,12 @@ module.exports = {
// [?] https://docs.mergefreeze.com/web-api#get-freeze-status
let isMainBranchFrozen = (
await sails.helpers.http.get('https://www.mergefreeze.com/api/branches/fleetdm/fleet/main', { access_token: sails.config.custom.mergeFreezeAccessToken }) //eslint-disable-line camelcase
).frozen;
).frozen || (
// TODO: Remove this timeboxed hack to consider the repo frozen
// for a while as a workaround for an issue where the MergeFreeze API
// reports that the repo is not frozen, when it actually is frozen.
Date.now() < (new Date('Jul 28, 2022 14:00 UTC')).getTime()
);
// Now, if appropriate, auto-approve the change.
if (isAutoApproved) {