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

Add plugin marketplace (for official plugins) #451

Merged
merged 23 commits into from
Oct 19, 2021

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Oct 16, 2021

closes #315

Peek 2021-10-16 18-22

List of Plugins is fetched on each build of the documentation.
Plugins are search by this query string:

// search for repos in woodpecker-ci org with the topic: woodpecker-plugin including forks

org:woodpecker-ci topic:woodpecker-plugin fork:true

https://github.com/search?q=org%3Awoodpecker-ci+filename%3Adocs.md+WOODPECKER_PLUGIN_DOCS

You can find a sample documentation for a plugin here: https://github.com/woodpecker-ci/plugin-demo/blob/main/docs.md

Preview

https://extra-small-jelly.surge.sh/plugins

@anbraten anbraten added the documentation docu & docs label Oct 16, 2021
@anbraten anbraten added this to the 0.15.0 milestone Oct 16, 2021
@anbraten anbraten changed the title Add plugin index Add plugin marktplace Oct 16, 2021
@jolheiser

This comment has been minimized.

@markkrj

This comment has been minimized.

@anbraten

This comment has been minimized.

@6543

This comment has been minimized.

@6543

This comment has been minimized.

@6543

This comment has been minimized.

@UnlimitedCookies

This comment has been minimized.

@6543

This comment has been minimized.

@anbraten

This comment has been minimized.

@UnlimitedCookies

This comment has been minimized.

@jolheiser

This comment has been minimized.

@anbraten
Copy link
Member Author

anbraten commented Oct 17, 2021

Okay lets move that discussion about third-party plugins from this PR to an issue: #453. I think or at least I hope so 😉, we all like the idea of having some list of at least the official plugins (git, docker, cache, ...) for now. We can start with opening the list then from time to time. So please add your ideas to #453 so we can discuss there and only add feedback regarding the "technical" index / list feature in here. THX

@anbraten anbraten changed the title Add plugin marktplace Add plugin marketplace Oct 17, 2021
@anbraten anbraten changed the title Add plugin marketplace Add plugin marketplace (for official plugins) Oct 17, 2021
@anbraten
Copy link
Member Author

I changed the code to search for all repositories with the following query: org:woodpecker-ci topic:woodpecker-plugin fork:true now.

docs/plugins/woodpecker-plugins/src/index.ts Outdated Show resolved Hide resolved
docs/plugins/woodpecker-plugins/src/index.ts Outdated Show resolved Hide resolved
docs/plugins/woodpecker-plugins/src/index.ts Outdated Show resolved Hide resolved
@jolheiser
Copy link
Member

jolheiser commented Oct 19, 2021

I changed the code to search for all repositories with the following query: org:woodpecker-ci topic:woodpecker-plugin fork:true now.

Do we need the fork:true part? The topic should work well enough and we may have non-forked plugins eventually, right?

Other than that I think this is close. 🙂

@6543
Copy link
Member

6543 commented Oct 19, 2021

We will have fork and non-forked plugin repos ...

@anbraten
Copy link
Member Author

anbraten commented Oct 19, 2021

We need fork: true it only means include forks (not search only for forks). Tested it with plugin-demo (no fork) and plugin-s3, plugin-git (both forks from drone plugins) and seems to work correctly.

@jolheiser
Copy link
Member

jolheiser commented Oct 19, 2021

We need fork: true it only means include forks (not search only for forks). Tested it with plugin-demo (no fork) and plugin-s3, plugin-git (both forks from drone plugins) and seems to work correctly.

Ah, my bad. Seems like an ambiguous query on GHs part.
https://docs.github.com/en/search-github/searching-on-github/searching-in-forks
fork:true includes forks (like you've done)
fork:only is for only forks 🤦

@anbraten
Copy link
Member Author

Yeah this option naming by Github is not the best.

@jolheiser
Copy link
Member

My only remaining nits are

  1. Remove the issue template
  2. For now it's probably fine, but we may want to think about how to deal with docs from third-party plugins. I don't know that throwing them onto the page is a best idea unless we can properly santize them.
  3. Is there any way we can cache results? Hitting the GH API for each person who views the page seems like we might hit a ratelimit.

@6543
Copy link
Member

6543 commented Oct 19, 2021

@jolheiser @anbraten
a. I did add logging back - it was usefully while looking at this pull ...

b. if i understand it right, we only hit github once per doc-build, so that should be ok?

@jolheiser
Copy link
Member

jolheiser commented Oct 19, 2021

b. if i understand it right, we only hit github once per doc-build, so that should be ok?

Oh interesting, maybe I missed that part. I thought this was running on the page. If it's just to build static content that should be fine.

EDIT:

List of Plugins is fetched on each build of the documentation.

I can't read. 🤦


For the issue template, I was under the impression this PR was for "official" plugins, as in we own them in our org.

Community plugins may need a bit more strategy.

@anbraten anbraten merged commit 0812a29 into woodpecker-ci:master Oct 19, 2021
@anbraten anbraten deleted the add-plugin-index branch October 19, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation docu & docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Own marketplace for plugins
5 participants