Skip to content

verify_cot fails to validate pull requests on repos that are forks #645

Description

@ahal

While testing some bitrisescript changes on staging-firefox-ios, @isabelrios discovered a CoT failure:
https://firefox-ci-tc.services.mozilla.com/tasks/C4i1LZAQS1iLhBbATtJBBw/runs/0/logs/public/logs/chain_of_trust.log

This is a json-e rendering error:

jsone.shared.InterpreterError: InterpreterError at template.tasks[0].repoUrl: infix: . expects objects

It happens because the .taskcluster.yml evaluates event.pull_request.head.repo.html_url (which is standard in all our .taskcluster.yml files), but the Github context that verfiy_cot resolves has:

pull_request:
    head:
        repo: None

I believe this is happening because staging-firefox-ios is a fork of firefox-ios, so it means we hit this condition:

if repo_definition["fork"]:

This causes us to use mozilla-mobile/firefox-ios as the head repository instead, and my theory is this causes the pull_request.head.repo to be None as the pull request in question doesn't exist over there.

Activity

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

Metadata

Metadata

Assignees

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