Fix #16: Added support for GitHub Enterprise instances#51
Conversation
| <groupId>org.kohsuke</groupId> | ||
| <artifactId>github-api</artifactId> | ||
| <version>1.95</version> | ||
| <version>1.317</version> |
There was a problem hiding this comment.
1.95 was using the hard-coded string URL for uploading the artifacts (upload.github.com), despite of the endpoint customization via GitHub builder. So I simply upgraded to the most recent version where URL customization has been fixed.
| <version>3.5.4</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| <dependency> |
There was a problem hiding this comment.
From Maven 3.9.0 and onwards, plexus-utils is no longer placed to plugin classpath by default (see release notes), so I had to add this one to ensure the code can run also when using recent Maven versions, which is the case in our environment.
3.2.1 is the one which works with maven-plugins-api of version 3.6.2 used by this plugin. See dependency page.
Maven 3.9.0 and onward doesn't include this dependency into plugins' classpath any more, see https://maven.apache.org/docs/3.9.0/release-notes.html
178dcd5 to
8b41fd6
Compare
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <java.version>1.7</java.version> | ||
| <java.version>1.8</java.version> |
| private static final Pattern REPOSITORY_PATTERN = Pattern.compile( | ||
| "^(scm:git[:|])?" + //Maven prefix for git SCM | ||
| "(https?://github\\.com/|git@github\\.com:)" + //GitHub prefix for HTTP/HTTPS/SSH/Subversion scheme | ||
| "(https?://[\\w\\d.-]+/|git@[\\w\\d.-]+:)" + //GitHub prefix for HTTP/HTTPS/SSH/Subversion scheme |
There was a problem hiding this comment.
changed to allow other hostnames. Alphanumeric, dots, dashes. Not perfect but better than nothing.
|
@jutzig I tested the public part with my fork of this repo, and the enterprise part within our organization, both work well. Thus far I published this version to our internal maven central mirror so that people in our org can start using it, but would appreciate a review and an official release as well. Thank you. |
|
@anenviousguest thank you very much for the pull request, looks great 👍 |
|
Thanks again for the change. I've merged it and uploaded release 1.5.1 |
|
Thanks a lot @jutzig for a quick turnaround! Did you by any chance upload the plugin to Maven Central? |
|
Yes, I deployed it last night and version 1.5.1 should be available on
central.
anenviousguest ***@***.***> schrieb am So., 19. Nov. 2023,
21:55:
… Thanks a lot @jutzig <https://github.com/jutzig> for a quick turnaround!
Did you by any chance uploaded the plugin to Maven Central?
—
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOELACE5FCFP5ITCTVV7TYFJW4ZAVCNFSM6AAAAAA7J42JMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXHE3TIOJTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Ah, thanks. I see it was uploaded to oss.sonatype.org, not to mvnrepository.com |
|
Yes, it gets mirrored from there. Depending on where you look, it can take
a bit to be visible everywhere.
The important one is central, and there it should already be available.
|
This RP adds support for customizing the GitHub API endpoint. This is needed if we want to publish releases to GitHub Enterprise instances hosted inside organizations.
The endpoint is inferred based on the
<scm>connection string and falls back to a regular public one (https://api.github.com).It should resolve #16.