Skip to content

chore(deps): update urfave/cli/v3 to v3.9.0#37863

Merged
bircni merged 7 commits into
go-gitea:mainfrom
silverwind:update-urfave-cli
May 30, 2026
Merged

chore(deps): update urfave/cli/v3 to v3.9.0#37863
bircni merged 7 commits into
go-gitea:mainfrom
silverwind:update-urfave-cli

Conversation

@silverwind

Copy link
Copy Markdown
Member

Updates github.com/urfave/cli/v3 to v3.9.0 and removes the renovate pin now that urfave/cli#2319 (the -c help flag parsing fix) is merged.

v3.9.0 prepends the default command name to the root command's args, which broke the old Root().Args() check in isValidDefaultSubCommand. It now uses the command's own Args().

Behavior change: ./gitea web <extra-positional-arg> now errors with unknown command instead of starting the web server and ignoring the trailing arg. web takes no positional args, so this is stricter (and arguably more correct) input handling. The intended ./gitea bad-cmd rejection is unchanged.


This PR was written with the help of Claude Opus 4.7

PR 2319 (the -c help flag parsing fix) is merged, so drop the renovate
pin. v3.9.0 prepends the default command name to the root command's
args, breaking the old Root().Args() check in isValidDefaultSubCommand;
use the command's own Args() instead.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 26, 2026
@github-actions github-actions Bot added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label May 26, 2026
@silverwind silverwind changed the title chore(deps): update module github.com/urfave/cli/v3 to v3.9.0 chore(deps): update urfave/cli/v3 to v3.9.0 May 26, 2026
@silverwind silverwind requested a review from Copilot May 26, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the urfave/cli/v3 dependency and adjusts default-command argument validation to match the updated CLI behavior.

Changes:

  • Updates github.com/urfave/cli/v3 from v3.6.1 to v3.9.0.
  • Removes the Renovate version pin for urfave/cli/v3.
  • Changes default subcommand validation to inspect the invoked command’s own positional args.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
cmd/helper.go Updates default subcommand validation for the new CLI arg behavior.
go.mod Bumps github.com/urfave/cli/v3 to v3.9.0.
go.sum Updates checksums for the new CLI dependency version.
renovate.json5 Removes the obsolete Renovate pin for urfave/cli/v3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/helper.go
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 27, 2026
@silverwind

silverwind commented May 27, 2026

Copy link
Copy Markdown
Member Author

I'll try to restore compat for ./gitea web <extra-positional-arg> to make this non-breaking, if it is possible at all without too many workarounds. I think long-term we might want to move to a different CLI parser (likely stdlib), this module is a maintenance nightmare imho with its constant breaking changes.

@TheFox0x7

Copy link
Copy Markdown
Contributor

You lose out of the box completions and still have to maintain the cli. You can always just not update urfave and get roughly the same outcome.

@silverwind

Copy link
Copy Markdown
Member Author

Could re-implement the relevant parts in first-party code, but probably not warranted here, yet.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@silverwind

Copy link
Copy Markdown
Member Author

Not easy to make the ./gitea web <extra> case non-breaking and imho not worth is, so ready for review.

silverwind and others added 2 commits May 28, 2026 05:14
* origin/main:
  [skip ci] Updated translations via Crowdin
  chore: Move gitea sdk from code.gitea.io/sdk/gitea -> gitea.dev/sdk (go-gitea#37855)
  chore(deps): update `chroma`, `regexp2` v2, replace `dimiro1/reply` (go-gitea#37858)
  chore: clarify SSH clone URL related config options (go-gitea#37877)
  chore: remove mssql `x509negativeserial` workaround (go-gitea#37853)
  [skip ci] Updated translations via Crowdin
  chore: Move import path from code.gitea.io/gitea to gitea.dev (go-gitea#37873)

# Conflicts:
#	renovate.json5
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 30, 2026
@bircni bircni enabled auto-merge (squash) May 30, 2026 20:05
@bircni bircni added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 30, 2026
@bircni bircni merged commit d0eba5e into go-gitea:main May 30, 2026
23 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 30, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 30, 2026
@silverwind silverwind deleted the update-urfave-cli branch May 31, 2026 03:08
Comment thread cmd/main_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants