-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat: add Github repository adapter to fetch releases from Github #616
Conversation
This will currently run into rate limit problems as we need to do a new request for each release to get the artifacts. I've proposed a PR to hub4j/github-api to fix that. Another option would be to lazily fetch the assets/download URL, but that we way cannot guarantee that the desired asset is present in the release.
hub4j/github-api#977 got merged so the technical blockers for this should be gone with the next release of the library 🤓 |
feat: use flexmark in ChangelogViewController feat: only use semver-compliant version from github
@@ -22,7 +21,7 @@ | |||
import java.util.stream.Collectors; | |||
|
|||
/** | |||
* Repository adapter for http://jenkins.terasology.io, replacing the {@link LegacyJenkinsRepositoryAdapter}. | |||
* Repository adapter for http://jenkins.terasology.io. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Repository adapter for http://jenkins.terasology.io. | |
* Repository adapter for https://jenkins.terasology.io. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this adapter still connects to HTTP (I did not change this here, because it does not solve the problem). Should probably do that in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, fair enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few code analysis findings you might want to address.
Also, the emojis don't work yet. But I guess we can have another look at that as a follow-up.
This PR adds a repository adapter to fetch releases from Github. It will only consider releases tagged with a semver, and skip other releases. It derives whether the build is LWJGLv3 or not by comparing semvers (against v4.1.0-rc.1).
I've tested this with the latest two (preview) releases under Linux Mint.
Old PR description below. This is no longer required to test this PR.
In order to test the Github integration for fetching releases you'll need to build and publish hub4j/github-api#977 locally. To do that, run
mvn clean install
and the JAR should be published to the local maven cache where Gradle can grab it from.Use
mavenLocal()
as additional repository inbuild.gradle
and bump the version fororg.kohsuke:github-api
to1.117-SNAPSHOT
.Without this patched library, fetching release assets requires a request for each release. As we have 52 of them right now and we're doing some more requests (e.g., to check whether there is a launcher update) this will eat up the free 60 requests per hour with the first start of the launcher...
Another option would be to lazily fetch the assets/download URL, but that we way cannot guarantee that the desired asset is present in the release... 🤔