Skip to content

Broken link when PR source repo has CircleCI enabled #7

Closed

Description

@QuLogic

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.

Activity

  1. larsoner commented on Mar 13, 2020

    @larsoner
    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...

  2. larsoner commented on Mar 13, 2020

    @larsoner
    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.

  3. larsoner commented on Jul 28, 2026

    @larsoner
    Collaborator

    I think this has been fixed since CircleCI's outputs are different nowadays (see for example #20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions