Skip to content

Support custom tag naming#88

Merged
f3ath merged 3 commits intof3ath:masterfrom
davidmartos96:tag_prefix
Feb 12, 2026
Merged

Support custom tag naming#88
f3ath merged 3 commits intof3ath:masterfrom
davidmartos96:tag_prefix

Conversation

@davidmartos96
Copy link
Contributor

@davidmartos96 davidmartos96 commented Feb 11, 2026

Hello!
After trying to use this package on our project, we found ourselves with a limitation when using the diff and tag template URLs.
On our Flutter app releases, we use a tag prefix to trigger CI/CD pipelines. So a git tag "v1.0.0" would actually release and a tag "1.0.0" wouldn't.
What this PR does is add an extra config option "link_template/version", which is a template for the version used in link templates (tag or diff). In this case the template could be: "v%value%"

I look forward to your thoughts on this.

@f3ath
Copy link
Owner

f3ath commented Feb 12, 2026

Thanks for the PR. I get the point and think it'd be a nice feature. Just for the sake of consistency, how about using the templating mechanism we already have? I mean a new class like

import 'package:cider/src/template/template.dart';

final class Version extends Template {
  const Version(super.template);

  String render(Object version) =>
      template.replaceAll('%version%', version.toString());
}

Let's call it version instead of tag_prefix and let the default template value be just %version%?
So that the config will look like

cider:
  link_template:
    diff: https://github.com/example/project/compare/%from%...%to%
    tag: https://github.com/example/project/releases/tag/%tag%
    version: v%version%

What do you think?

@davidmartos96
Copy link
Contributor Author

@f3ath Didn't think of that. It's a great idea. I have pushed the alternative design

@davidmartos96 davidmartos96 changed the title Support a tag prefix Support custom tag naming Feb 12, 2026
@f3ath f3ath merged commit 993d475 into f3ath:master Feb 12, 2026
1 check passed
@f3ath
Copy link
Owner

f3ath commented Feb 12, 2026

Thank you!

@davidmartos96 davidmartos96 deleted the tag_prefix branch February 13, 2026 04:39
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