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 "Github Releases" publisher #179

Closed
cjbrooks12 opened this issue Oct 3, 2018 · 5 comments
Closed

Add "Github Releases" publisher #179

cjbrooks12 opened this issue Oct 3, 2018 · 5 comments
Labels
enhancement Task Type: New features, additional options for existing features, etc. plugins Project Type: Plugins, Language extensions

Comments

@cjbrooks12
Copy link
Contributor

I've been using the Travis CI Github Releases plugin for a while to push new releases to Github. But this plugin has some serious flaws and I can only set the name of the release, not the release notes. I would like to have an Orchid publisher to create that release, so having automated releases is no longer dependent upon the CI platform, but bundled within Orchid itself, which can run on any CI platform.

This should be implemented as a new OrchidPublisher subclass in the OrchidChangelog plugin. It should use the current site version to find a Changelog entry, and then use that for the release name, and send the release notes as the body.

@cjbrooks12 cjbrooks12 added enhancement Task Type: New features, additional options for existing features, etc. plugins Project Type: Plugins, Language extensions hacktoberfest labels Oct 3, 2018
@yaroslavm
Copy link

Hi @cjbrooks12 , where new publisher should publish/send notes to?

@cjbrooks12
Copy link
Contributor Author

It should be posting data directly to the Github API. The data to post should be the name and content of the current changelog version, similar to https://github.com/JavaEden/Orchid/blob/dev/plugins/OrchidChangelog/src/main/kotlin/com/eden/orchid/changelog/publication/RequiredChangelogVersionPublisher.kt.

https://developer.github.com/v3/repos/releases/#create-a-release

@yaroslavm
Copy link

@cjbrooks12 I pushed a publisher but still have several questions:

  1. Do we still need default RequiredChangelogVersionPublisher.kt in changelog plugin?
  2. I copied rate-limit handling from Netlify plugin: NetlifyPublisher#timeoutRateLimit. What is the better way to share this part of code?
  3. How do you test plugins? I didn't find tests and also ./gradlew :plugins:OrchidChangelog:assemble or similar from contributing manual doesn't work for me - build exists with successful status but did nothing.

@cjbrooks12
Copy link
Contributor Author

Thanks for the work on this, I'm going over it now.

  1. I think it makes sense to keep this around, for example if someone is hosting the project on Gitlab or somewhere else, but still wants to validate the changelog.
  2. I don't think we would need the rate-limiting for this publisher. The NetlifyPublisher makes a separate HTTP request per-file it's uploading, so publishing a full site is likely to hit the limit just by itself. But creating a GitHub release is just a single HTTP call, so rate-limiting shouldn't be an issue.
  3. Orchid doesn't really have any good testing infrastructure set up yet. You should just set it up in the OrchidCore config as described in this wiki page, and then running ./gradlew :OrchidCore:orchidDeploy will build the site and run the publishers.

cjbrooks12 added a commit that referenced this issue Oct 15, 2018
@cjbrooks12
Copy link
Contributor Author

Added in #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Task Type: New features, additional options for existing features, etc. plugins Project Type: Plugins, Language extensions
Projects
None yet
Development

No branches or pull requests

2 participants