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(getMostRecentTags): add fetchRemote option to allow disabling remote fetching #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Aug 13, 2024

Currently, the getMostRecentTags will perform a git fetch --tags, failing if the remote fetching does.

This adds a new option fetchRemote (default true). Setting it to false disables the remote-fetching.

Motivation: Allow running https://github.com/MetaMask/create-release-branch/ in an unauthenticated context.

@legobeat legobeat marked this pull request as ready for review August 13, 2024 01:14
@legobeat legobeat requested a review from a team as a code owner August 13, 2024 01:14
@legobeat legobeat requested review from a team October 25, 2024 23:36
Comment on lines 27 to 32
if (typeof fetchRemote !== 'boolean' || fetchRemote) {
await runCommand('git', ['fetch', '--tags']);
}
Copy link
Member

Choose a reason for hiding this comment

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

Could we cover this with some tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This entire module is currently untested, unfortunately...

Copy link
Contributor Author

@legobeat legobeat Oct 29, 2024

Choose a reason for hiding this comment

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

basic unit test for the new behavior has been added, alongside a new run option to facilitate testing.

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