Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions website/api/controllers/webhooks/receive-from-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,12 @@ module.exports = {
// ```
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// FUTURE: reenable these requests when the bug that causes API requests to unfreeze the entire repo is resolved.
// await sails.helpers.http.post(`https://www.mergefreeze.com/api/branches/fleetdm/fleet/main?access_token=${encodeURIComponent(sails.config.custom.mergeFreezeAccessToken)}`, {
// user_name: 'fleet-release',//eslint-disable-line camelcase
// unblocked_prs: pocketOfPrNumbersUnfrozen,//eslint-disable-line camelcase
// });
// // Update the Platform record to have the current unfrozen PR numbers
// await Platform.updateOne({id: platformRecord.id}).set({currentUnfrozenGitHubPrNumbers: pocketOfPrNumbersUnfrozen});
await sails.helpers.http.post(`https://www.mergefreeze.com/api/branches/fleetdm/fleet/main?access_token=${encodeURIComponent(sails.config.custom.mergeFreezeAccessToken)}`, {
user_name: 'fleet-release',//eslint-disable-line camelcase
unblocked_prs: pocketOfPrNumbersUnfrozen,//eslint-disable-line camelcase
});
// Update the Platform record to have the current unfrozen PR numbers
await Platform.updateOne({id: platformRecord.id}).set({currentUnfrozenGitHubPrNumbers: pocketOfPrNumbersUnfrozen});
}//fi

} else {
Expand All @@ -503,13 +502,12 @@ module.exports = {
sails.log.verbose('#'+prNumber+' not autoapproved, main branch is frozen... prNumbers unfrozen:',pocketOfPrNumbersUnfrozen);

// [?] See explanation above.
// FUTURE: reenable these requests when the bug that causes API requests to unfreeze the entire repo is resolved.
// await sails.helpers.http.post(`https://www.mergefreeze.com/api/branches/fleetdm/fleet/main?access_token=${encodeURIComponent(sails.config.custom.mergeFreezeAccessToken)}`, {
// user_name: 'fleet-release',//eslint-disable-line camelcase
// unblocked_prs: pocketOfPrNumbersUnfrozen,//eslint-disable-line camelcase
// });
// // Update the Platform record to have the current unfrozen PR numbers
// await Platform.updateOne({id: platformRecord.id}).set({currentUnfrozenGitHubPrNumbers: pocketOfPrNumbersUnfrozen});
await sails.helpers.http.post(`https://www.mergefreeze.com/api/branches/fleetdm/fleet/main?access_token=${encodeURIComponent(sails.config.custom.mergeFreezeAccessToken)}`, {
user_name: 'fleet-release',//eslint-disable-line camelcase
unblocked_prs: pocketOfPrNumbersUnfrozen,//eslint-disable-line camelcase
});
// Update the Platform record to have the current unfrozen PR numbers
await Platform.updateOne({id: platformRecord.id}).set({currentUnfrozenGitHubPrNumbers: pocketOfPrNumbersUnfrozen});
}//fi

// Is this in use?
Expand Down