Skip to content

Commit

Permalink
fix: changed approval requirement check to use the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jul 15, 2024
1 parent bedb5ca commit e1f50e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/update-pull-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function updatePullRequests(context: Context) {
`Requirements according to association ${pullRequestDetails.author_association}: ${JSON.stringify(requirements)} with last activity date: ${lastActivityDate}`
);
if (isNaN(lastActivityDate.getTime()) || isPastOffset(lastActivityDate, requirements.mergeTimeout)) {
if ((await getApprovalCount(context, gitHubUrl)) > 0) {
if ((await getApprovalCount(context, gitHubUrl)) > requirements.requiredApprovalCount) {
if (await isCiGreen(context, pullRequestDetails.head.sha, gitHubUrl)) {
context.logger.info(`Pull-request ${pullRequest.url} is past its due date (${requirements.mergeTimeout} after ${lastActivityDate}), will merge.`);
await mergePullRequest(context, pullRequest, gitHubUrl);
Expand Down

0 comments on commit e1f50e9

Please sign in to comment.