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

Update logging #60

Merged
merged 6 commits into from
Sep 13, 2023
Merged

Update logging #60

merged 6 commits into from
Sep 13, 2023

Conversation

PatrickAtlassian
Copy link
Contributor

Description

Removing some logging and adding logging for client calls

Checklist

Please ensure that each of these items has been addressed:

  • [] I have tested these changes in my local environment
  • I have added/modified tests as applicable to cover these changes
  • (Atlassian contributors only) I have removed any Atlassian-internal changes including internal modules, references to internal tickets, and internal wiki links

@PatrickAtlassian PatrickAtlassian requested a review from a team as a code owner September 8, 2023 22:02
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`);

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?

@@ -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`);

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.`,
Copy link
Contributor

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?

Copy link
Contributor Author

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

@PatrickAtlassian PatrickAtlassian merged commit 0e1ff3a into main Sep 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants