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

refactor: internally use the positive flags #93

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

draftcode
Copy link
Contributor

While the flags are --no-fetch/--no-push, internally use the positive
flags because it's hard to read.

@aviator-app
Copy link
Contributor

aviator-app bot commented Apr 25, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.

@draftcode draftcode requested a review from a team April 25, 2023 23:17
Copy link
Contributor

@twavv twavv left a comment

Choose a reason for hiding this comment

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

We talked about this externally and I think it's a decent change.

There's a bit of a distinction between how we want to handle this internally/externally (just writing this for posterity):

  • For external things (i.e., the public API of the av CLI), we optimize for the ideal UX. Generally, we want to fetch/push by default otherwise users will be surprised when their changes after sync are not reflected on GitHub.
  • For internal things, we want to optimize both for code readability and also for opting-in to "side effects." Generally, not fetching/not pushing is the "safer" default since it doesn't modify external systems (such as the local Git database or GitHub).

Either way, we still have default values are false in typical Go style.

While the flags are --no-fetch/--no-push, internally use the positive
flags because it's hard to read.
@aviator-app aviator-app bot merged commit 122d97a into master May 2, 2023
@aviator-app aviator-app bot deleted the positive_flag branch May 2, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants