-
Notifications
You must be signed in to change notification settings - Fork 11
Add --json flag for the status sub-command
#23
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
Add --json flag for the status sub-command
#23
Conversation
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
left a comment
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.
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() |
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.
Wouldn't we miss an encoding error this way?
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.
You are completely right. I'll think about a solution and will update the PR shortly
The previous condition missed the return keyword.
|
Added a commit to fix a missing Would appreciate if you could quickly review it so that we can merge your feature 🙂 |
flying7eleven
left a comment
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.
🤦🏻 you are completely right, I guess that was my lack of golang knowledge (returning without the return keyword is a pattern of Rust)
|
I thought so 😅 |
This PR combines two different things since the first one was mandatory for me for actually testing my changes:
arm64architecture.--jsonflag to thegit-team statuscommand. This prints out the same information as without this flag but in a machine-readable format.Happy to discuss the proposed changes 🥳