plugin-site icon indicating copy to clipboard operation
plugin-site copied to clipboard

Add edit this page link

Open timja opened this issue 4 years ago • 11 comments

We currently have:

Help us improve this page! To propose a change submit a pull request to the plugin page on GitHub.

It would be good to add an 'Edit this page' or 'Improve this page' link next to report a problem so you can go directly to the GitHub edit page screen from the plugin site

timja avatar Jan 01 '21 16:01 timja

Can I do this? @timja

Chandu-4444 avatar Jul 27 '21 05:07 Chandu-4444

if the goal is just to have the same link in two places, this should be quite straightforward. If we want the actual link for editing the readme, the hard part is to figure out which file it is -- it may be README.md / README.txt / README.adoc, not sure how to efficiently get it from GitHub API. Also at the moment all queries to GH API are in the plugin-site-api repository.

zbynek avatar Jul 28 '21 00:07 zbynek

@zbynek May I work on this issue?

RiyaGupta89 avatar Oct 02 '21 05:10 RiyaGupta89

Sure, let us know if you need a hand or unable to work on it

halkeye avatar Oct 02 '21 05:10 halkeye

@timja do you have any idea how to get the correct link from GitHub API?

zbynek avatar Oct 02 '21 09:10 zbynek

You can get it from this:

https://api.github.com/repos/jenkinsci/theme-manager-plugin/readme?ref=master

timja avatar Oct 02 '21 13:10 timja

Any update on this issue?

Harsh3341 avatar Jun 03 '23 06:06 Harsh3341

what update are you expecting?

halkeye avatar Jun 03 '23 06:06 halkeye

The implementation part is it needs to be done? This issue is been old just asking if it's necessary to work on it.

Harsh3341 avatar Jun 04 '23 18:06 Harsh3341

It's still a valid issue, IMHO not a high priority though.

The question is how to best find location of the README in repository. It's possible to do that with rest API, but that means 1 request per repository. Since plugin-site repo doesn't have credentials for GitHub API that would have to be exposed through API of some other component, such as https://github.com/jenkins-infra/docker-plugin-site-issues . One could ask GitHub developers to add it to the GraphQL API so that it can be obtained for 100 repos in one query. Or just try the 2-4 most common locations. Currently https://github.com/jenkins-infra/plugin-site/pull/961 implements the last approach.

zbynek avatar Jun 04 '23 20:06 zbynek

is this still to be done? if so let me know where i can found Help us improve this page!

nouralmulhem avatar Feb 29 '24 03:02 nouralmulhem