Skip to content

Commit

Permalink
feat: add log for merge queue
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Jan 31, 2025
1 parent ddd7b81 commit 91225e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/services/merge-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { config } from '../../config.js';
import * as pullRequestRepository from '../repositories/pull-request-repository.js';
import githubService from '../../common/services/github.js';
import { PullRequestNotFoundError } from '../repositories/pull-request-repository.js';
import { logger } from '../../common/services/logger.js';

export const MERGE_STATUS = {
ABORTED: 'ABORTED',
Expand Down Expand Up @@ -41,6 +42,15 @@ export class MergeQueue {
...nextMergingPr,
isMerging: true,
});

logger.info({
event: 'current-merge-state',
message: `Repository: ${repositoryName}; PR en attente : ${pr.length}; ordre à venir : ${pr.map(({ number }) => number).join(',')}`,
});
logger.info({
event: 'dispatch-to-merge-action',
message: `Déclenchement de l'action de merge pour la PR : ${nextMergingPr.repositoryName} #${nextMergingPr.number}`,
});
await this.#githubService.triggerWorkflow({
workflow: {
id: config.github.automerge.workflowId,
Expand Down

0 comments on commit 91225e5

Please sign in to comment.