refactor: updated logging messages (#65)

This commit is contained in:
Andrea Lamparelli 2023-07-20 10:05:07 +02:00 committed by GitHub
parent e29dae5073
commit a8db0755a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 88 additions and 85 deletions

View file

@ -32,7 +32,7 @@ export default class GitHubClient implements GitClient {
}
async getPullRequest(owner: string, repo: string, prNumber: number, squash = true): Promise<GitPullRequest> {
this.logger.info(`Getting pull request ${owner}/${repo}/${prNumber}.`);
this.logger.debug(`Fetching pull request ${owner}/${repo}/${prNumber}`);
const { data } = await this.octokit.rest.pulls.get({
owner: owner,
repo: repo,
@ -66,7 +66,7 @@ export default class GitHubClient implements GitClient {
// WRITE
async createPullRequest(backport: BackportPullRequest): Promise<string> {
this.logger.info(`Creating pull request ${backport.head} -> ${backport.base}.`);
this.logger.info(`Creating pull request ${backport.head} -> ${backport.base}`);
this.logger.info(`${JSON.stringify(backport, null, 2)}`);
const { data } = await this.octokit.pulls.create({