Skip to content

Conversation

@flying7eleven
Copy link
Contributor

This PR combines two different things since the first one was mandatory for me for actually testing my changes:

  1. The commit 7b751bf allows the test containers to also be run on Mx-based Macs as well. There were some hard coded architecture flags I had to switch to a some more dynamic ones as well as use generic container images which are also provided with arm64 architecture.
  2. The actual change I wanted to provide is in the other commits. They add a --json flag to the git-team status command. This prints out the same information as without this flag but in a machine-readable format.

Happy to discuss the proposed changes 🥳

This feature allows easier access to some of the state variables
for scripts doing actions based on the state of git-team.

One example where this feature might be useful is to temporary
disable git team, install some pre-commit hocks and afterwards
re-enabling it with the same, previously configured, co-authors.
@hekmekk hekmekk self-requested a review May 16, 2025 13:27
@hekmekk hekmekk self-assigned this May 16, 2025
Copy link
Owner

@hekmekk hekmekk left a comment

Choose a reason for hiding this comment

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

Thanks very much for the feature 💐

Looking forward to merging it. Just got 2 open points, which I'm sure can be resolved quickly 😉

encoder.SetEscapeHTML(false)
err := encoder.Encode(theState)
if err != nil {
return buffer.String()
Copy link
Owner

Choose a reason for hiding this comment

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

Wouldn't we miss an encoding error this way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are completely right. I'll think about a solution and will update the PR shortly

The previous condition missed the return keyword.
@hekmekk
Copy link
Owner

hekmekk commented Jun 5, 2025

Added a commit to fix a missing return keyword so that the json encoding error actually makes it out of the mapper and can be displayed to the user.

Would appreciate if you could quickly review it so that we can merge your feature 🙂

Copy link
Contributor Author

@flying7eleven flying7eleven left a comment

Choose a reason for hiding this comment

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

🤦🏻 you are completely right, I guess that was my lack of golang knowledge (returning without the return keyword is a pattern of Rust)

@hekmekk
Copy link
Owner

hekmekk commented Jun 6, 2025

I thought so 😅

@hekmekk hekmekk merged commit dbaac4e into hekmekk:main Jun 6, 2025
1 check 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.

2 participants