Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for tags with prefix #65

Open
tony opened this issue Apr 28, 2017 · 11 comments
Open

Support for tags with prefix #65

tony opened this issue Apr 28, 2017 · 11 comments

Comments

@tony
Copy link

tony commented Apr 28, 2017

Is it possible you could make have an option to add custom prefixes to the tree such as v?

In https://libtmux.git-pull.com/en/latest/history.html, I want 0.7.0 to point to https://github.com/tony/libtmux/tree/v0.7.0 instead of https://github.com/tony/libtmux/tree/0.7.0

@bitprophet
Copy link
Owner

You should be able to use a custom release_uri for this :) E.g. in your sphinx conf.py, say releases_release_uri = "https://github.com/tony/libtmux/tree/v". It will then append the numeric version number, resulting in https://github.com/tony/libtmux/tree/v0.7.0 as you need it to.

Let me know if I've missed something or if that functionality doesn't appear to work!

@tony
Copy link
Author

tony commented May 9, 2017

@bitprophet what about "Next Release" forwarding to vmaster? https://cihai.git-pull.com/en/latest/history.html

@bitprophet
Copy link
Owner

Ah yea, that would be a problem, wouldn't it. Let's reopen. There might be an existing setting that helps still, I'd have to dig, but assuming not, I do think it'd be nice to make it easier to do exactly this - a prefix applied to released links but not unreleased ones.

@tony
Copy link
Author

tony commented May 20, 2017

Thanks for getting back @bitprophet. For me it's a bug since I'm already using the v convention on releases for my projects, if you do know an existing setting I can use in the meantime it'd be helpful

@tony
Copy link
Author

tony commented Jun 20, 2018

@bitprophet any update on this one?

@tony
Copy link
Author

tony commented Jun 20, 2018

Hm, I can try to introduce a PR during the weekend if it's okay :)

Maybe I can try to make it toggleable via a config variable? Any suggestions for a name of a config variable/condition to use?

@bitprophet
Copy link
Owner

Offhand, just release_prefix or perhaps release_tag_prefix probably works? if you get a PR together I'll doublecheck names and stuff when I merge. Thanks!

@tony
Copy link
Author

tony commented Jun 23, 2018

@bitprophet This seems to be done: #54

tony added a commit to tmux-python/libtmux that referenced this issue Jun 23, 2018
See also:
- bitprophet/releases#54 (original PR by
  @scolby33)
- bitprophet/releases#76 (rebased branch of
  above PR used in this commit)
- Feature request: bitprophet/releases#65
@eric-wieser
Copy link

Seems both #54 and #76 have become stale.

@eric-wieser
Copy link

You can work around this with:

class _releases_release_uri:
    def __mod__(self, release):
        if release.isdigit():
            release = "v" + release
        return 'https://github.com/%s/tree/%s' % (releases_github_path, release)
releases_release_uri = _releases_release_uri()

@tony
Copy link
Author

tony commented May 26, 2020

Sorry about this, I don't use this package anymore - if someone is interested in continuing this somehow - they're welcome to rebase. This request is from so long ago I forgot about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants