Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] Ajouter des logs pour simplifier le debug de la merge queue #512

Merged
merged 1 commit into from
Jan 31, 2025
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
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