Open QuLogic opened 4 years ago
@QuLogic I also do not know. This is also probably a dup of https://github.com/larsoner/circleci-artifacts-redirector/issues/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...
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.
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.