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

Custom domains for [JitPack] artifacts #8333

Merged
merged 6 commits into from Aug 22, 2022
Merged

Conversation

DadiBit
Copy link
Contributor

@DadiBit DadiBit commented Aug 21, 2022

closes #8312

Introduced a new jitpack/version endpoint: jitpack/v redirects to it, either with no VCS (still defaulting to GitHub), or with a VCS previously supported.

It uses the full groupId from jitpack as input (usually com.github.user, but custom domains, like io.jitpack, as well).

@shields-ci
Copy link

shields-ci commented Aug 21, 2022

Messages
📖 ✨ Thanks for your contribution to Shields, @DadiBit!

Generated by 🚫 dangerJS against a711e8c

Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for taking this forward

dateAdded: new Date('2019-03-31'),
}),
redirector({
Copy link
Member

@chris48s chris48s Aug 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the tests are failing is:

Error: Duplicate service names found: {
  "JitpackVRedirect": 2
}

we'll need to manually give each of these redirects a unique name when we declare them as the auto-generated names are clashing.

https://github.com/badges/shields/blob/master/core/base-service/redirector.js#L46-L50

You can run npm test locally to run the core tests and liners

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you; I couldn't get npm install to work... I've fixed it and was finally able to test the code.

Comment on lines 13 to +15
static route = {
base: 'jitpack/v',
pattern: ':vcs(github|bitbucket|gitlab|gitee)/:user/:repo',
base: 'jitpack/version',
pattern: ':groupId/:artifactId',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets leave a comment linking to #8312 to explain why we're using /version rather than /v here.

Comment on lines +13 to +15
t.create('jitpack version redirect (github)')
.get('/github/jitpack/maven-simple.svg')
.expectRedirect('/jitpack/version/com.github.jitpack/maven-simple.svg')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chris48s
Copy link
Member

cheers - merging with slightly tweaked names

@repo-ranger repo-ranger bot merged commit 9daae0c into badges:master Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jitpack: custom domain for organization
3 participants