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

feat: log when a repo is renamed #230

Merged
merged 2 commits into from
Sep 16, 2023
Merged

feat: log when a repo is renamed #230

merged 2 commits into from
Sep 16, 2023

Conversation

ericboucher
Copy link
Contributor

Handle the case when a repo is renamed by logging the info.

@sonarcloud
Copy link

sonarcloud bot commented Sep 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Comment on lines +138 to +141
self.logger.info(
f"Repository name changed: {repo_full_name} \t"
f"New name: {name_with_owner}"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Use printf-style for logs

Suggested change
self.logger.info(
f"Repository name changed: {repo_full_name} \t"
f"New name: {name_with_owner}"
)
self.logger.info(
"Repository name changed: %s \tNew name: %s",
repo_full_name,
name_with_owner,
)

https://blog.pilosus.org/posts/2020/01/24/python-f-strings-in-logging/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like f-strings are a bit more readable in this case no? If Meltano has a strong feeling for %s I'll open an issue to change other instances of logs as well

@ericboucher ericboucher merged commit 292bcb3 into main Sep 16, 2023
7 checks passed
@ericboucher ericboucher deleted the log-moved-repos branch September 16, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants