Skip to content
This repository was archived by the owner on Oct 22, 2026. It is now read-only.

feat(getMostRecentTags): add fetchRemote option to allow disabling remote fetching - #199

Open
legobeat wants to merge 2 commits into
MetaMask:mainfrom
legobeat:offline-mode
Open

legobeat wants to merge 2 commits into
MetaMask:mainfrom
legobeat:offline-mode

Conversation

@legobeat

@legobeat legobeat commented Aug 13, 2024 •

Copy link
Copy Markdown
Contributor

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 thread src/update-changelog.ts
Comment on lines +27 to +32
if (typeof fetchRemote !== 'boolean' || fetchRemote) {
await runCommand('git', ['fetch', '--tags']);
}

Copy link
Copy Markdown
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
Copy Markdown
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...

@legobeat legobeat Oct 29, 2024 •

Copy link
Copy Markdown
Contributor Author

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.

@mcmire

mcmire commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Coming back to this PR. I think this would be useful to have, although for an additional reason than originally proposed. It appears that both create-release-branch and auto-changelog fetch tags, which is not necessary. Adding a flag to auto-changelog would be useful so that create-release-branch doesn't end up fetching tags twice.

@MetaMask MetaMask locked and limited conversation to collaborators Oct 22, 2026
@GuillaumeRx

Copy link
Copy Markdown
Contributor

This library has now been migrated into the release-tools monorepo. This PR has been locked and this repo will be archived shortly. Going forward, releases of this library will only include changes made in the release-tools repo.

  • Please push this branch to release-tools and open a new PR there.
  • Optionally, add a link pointing to the discussion in this PR to provide context.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants