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

Broken link when PR source repo has CircleCI enabled #7

Open
QuLogic opened this issue Mar 13, 2020 · 2 comments
Open

Broken link when PR source repo has CircleCI enabled #7

QuLogic opened this issue Mar 13, 2020 · 2 comments

Comments

@QuLogic
Copy link

QuLogic commented Mar 13, 2020

Looking at the source, it seems like you use payload.repository.id in the domain name for links. That ID seems to point to the target repo. The way CircleCI works is to build a head commit, not a merge, so the target doesn't matter. If the source repo also has CircleCI enabled, then the build is not run again for the PR. The domain name then has the ID of the source repository.

For example, in this PR, the link from the Action is posted as:
https://31997-1385122-gh.circle-artifacts.com/0/doc/build/html/index.html
i.e., repository ID = 1385122, but navigating through the build, the link should be:
https://13144-7439715-gh.circle-artifacts.com/0/doc/build/html/index.html
with repository ID = 7439715, which corresponds with the source repo.

I don't know if this information is exposed somehow in the payload.

@larsoner
Copy link
Collaborator

@QuLogic I also do not know. This is also probably a dup of larsoner/circleci-artifacts-redirector#6 (though that version of this project is more or less deprecated). Any help figuring it out / making a PR is appreciated, my knowledge is limited here...

@larsoner
Copy link
Collaborator

If it would help, a first step might be to log the payload itself when actually making the link. That would tell you if there was something in there that could be used to fix it. Then a second PR could be made to actually make the correction.

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

No branches or pull requests

2 participants