Skip to content

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