Can you retrieve list of tags via RSS API?

已查看 92 次
跳至第一个未读帖子

Gerard Smyth

未读,
2014年3月25日 14:14:252014/3/25
收件人 git...@googlegroups.com
Hi all,

I am trying to get a list of all the tags in a repository via the RSS (or JSON) API but I am not sure whether this is currently possible.

From what I can see all the info I need is returned in the RSS feed, but I would have to get every commit, and then manually pick out just those that have a tag ref applied to them.  Ideally I would like this filtering to happen on the server as this would greatly reduce the amount of info being returned and processed.  Is there any way of doing this at the moment? Perhaps via a search type value?

Many thanks for any help you can provide.

Regards,
Gerard

James Moger

未读,
2014年3月25日 14:22:412014/3/25
收件人 git...@googlegroups.com
Use the LIST_REPOSITORIES RPC request, pull out the repo from the
list, and then iterate over the available refs.

Example: https://dev.gitblit.com/rpc?req=list_repositories
(this is more clear with something like JSONView for FireFox/Chrome)

-J

Gerard Smyth

未读,
2014年3月25日 16:26:252014/3/25
收件人 git...@googlegroups.com
Thanks for the quick response.

For each tag I also need to know the tagger, when it was created, the tag message, and the associated commit id.
Would the best approach to get this info be to call the feed URL for each one? eg https://dev.gitblit.com/feed/mirrors/Font-Awesome.git?h=refs/tags/v4.0.3&l=1
Is the message etc returned by this for the tag or the commit?

Many thanks for your help.

Gerard

James Moger

未读,
2014年3月25日 16:52:122014/3/25
收件人 git...@googlegroups.com
The returned data is the commit. The tag data is not currently
retrievable by the RSS feed nor the RPC api.

-J

gerard...@gmail.com

未读,
2014年3月25日 17:40:122014/3/25
收件人 git...@googlegroups.com
Ok, thanks for the info.

If I wanted to look at adding this capability can you provide any pointers as to where to look?

Many thanks,
Gerard

--
You received this message because you are subscribed to a topic in the Google Groups "gitblit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gitblit/QPsBzhAMvB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gitblit+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Moger

未读,
2014年3月26日 07:43:392014/3/26
收件人 git...@googlegroups.com
Since the RSS feed is the only place where commits are exposed as
retrievable data, I would start with the SyndicationServlet and add
special handling for tags.

-J

Gerard Smyth

未读,
2014年3月31日 06:17:412014/3/31
收件人 git...@googlegroups.com
Thanks for the info.
I think I have got something working for me.

Is this something you would be interested in accepting a patch for?  I'd rather be using a released version if possible.

If so, what is your approach for this?

Many thanks,
Gerard

James Moger

未读,
2014年3月31日 08:25:522014/3/31
收件人 git...@googlegroups.com
At the moment I prefer pull requests - Github or Bitbucket. If/when
Gitblit gets OpenID authentication then we can add Tickets to the mix.

-J
> --
> You received this message because you are subscribed to the Google Groups
> "gitblit" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Gerard Smyth

未读,
2014年4月29日 10:48:472014/4/29
收件人 git...@googlegroups.com
Hi,

I tried to create a pull request for this a few weeks ago, but I'm pretty new to this git stuff, so in case I've done something wrong I thought I would post here. :)

Hopefully you can see the details on GitHub at https://github.com/gitblit/gitblit/pull/165

Please let me know if you have any issues, or need me to change anything.

Thanks,
Gerard

James Moger

未读,
2014年4月29日 11:00:572014/4/29
收件人 git...@googlegroups.com
Hi Gerard,

You did the pull request correctly.  I need to make the time to review.

-J

回复全部
回复作者
转发
0 个新帖子