Closed ghost closed 13 years ago
AFAIK it is possible to check whether a repo is a fork (through the Github API), but not from where it was forked. Alternatively I could add an org
option, to be used to generate the API request, but it'll have to be set manually, and won't work with the GitHub::Update
plugin unless you have admin (?) access to the org's repository.
This is something I have been thinking about for a while, but never managed to implement, so, if you find this useful, I'll start working on it ASAP.
I'd rather see links point to wherever the repo forked from - this actually isn't specific to organizations, now that I think of it. If it was forked from some other user's repo, then we should point back to that, in all likelihood. I suppose it might make sense to have an option to disable that...
Ok, I cannot make it point automatically to the original repo. I was thinking about something like a fork
option for the GitHub::Meta
plugin, with values in the form <user>/<repo>
(where user
and repo
are the original ones) or something similar. What do you think?
That'll do fine.
Just ignore what I said... it is possible to know from where a repository was forked from, through the API. I just didn't pay enough attention. Working on it right now.
Pushed, and uploaded to CPAN. It seems to work, but some testing is appreciated (you don't have to do anything fancy, just dzil build
and check whether META.{yml,json}
have the correct information).
Perfect! Thanks so much
Just curious -- why would you rather see a link to the original repository? If I want to fork and make a pull request, I would want to do it with the repository that actually produced the dist. The original repository could be dead for all I know.
As I understand the code, GitHub::Meta merely looks for the immediate parent repository, which may not be the "original" repository anyway. A repository could be a fork of a fork (of a fork...). To do this right, I think it would have to be recursive.
But perhaps I don't understand how GitHub really works. Your thoughts?
-Jeff
@thaljef it is useful, for example, when you are developing a project through an organization but you are doing all the development on your personal fork (e.g. MediaWiki-Bot/MediaWiki-Bot and mikelifeguard/MediaWiki-Bot). This was basically where it all started IIRC.
Hmm, I guess folks use GitHub differently than I expected. I would have thought that the organizational repository would pull changes from the personal forks, and releases would be made from the organizational repository. I'll have to setup an organization for myself and see how it works. Thanks for enlightening me.
Is it possible to check whether the repo was forked from an organization's repo? If so, it'd be nice to point to that instead of the user's individual fork. For example, the org may have issues enabled, but the user may not.