-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update logging #60
Update logging #60
Conversation
src/client/gitlab.ts
Outdated
const { data } = await callGitlab(`/api/v4/groups?${queryParams}`, groupAccessToken); | ||
|
||
return data; | ||
}; | ||
|
||
export const registerGroupWebhook = async (payload: RegisterWebhookPayload): Promise<number> => { | ||
const { groupId, token: groupToken, url, signature } = payload; | ||
console.log(`Calling gitlab to register webhook`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of logging at each method, callGitlab
can take the name of the calling function and log it for all requests?
src/client/gitlab.ts
Outdated
@@ -162,13 +171,22 @@ export const getGroupWebhook = async ( | |||
}; | |||
|
|||
export const getGroupAccessTokens = async (groupToken: string, groupId: number): Promise<GroupAccessToken[]> => { | |||
const { data: groupAccessTokenList } = await callGitlab(`/api/v4/groups/${groupId}/access_tokens`, groupToken); | |||
console.log(`Calling gitlab to get group access tokens`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more here 😅
return { | ||
componentsToCreate: [], | ||
componentsToUpdate: [], | ||
componentsToUnlink: [], | ||
}; | ||
} | ||
console.log( | ||
`Found ${added.length} added diffs, ${removed.length} removed diffs, and ${added.length} removed diffs in push event. Now processing what files might have been moved or renamed.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not fully sure of the specifics of this file, but it seems like it would log "__ added diffs, __ removed diffs, and __ removed diffs" --> should the last "removed diffs" be something different or is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops yes sorry i was copy-pasting too fast LOL
Description
Removing some logging and adding logging for client calls
Checklist
Please ensure that each of these items has been addressed: