Merged
Conversation
Owner
|
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 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? |
Contributor
Author
|
@f3ath Didn't think of that. It's a great idea. I have pushed the alternative design |
Owner
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.