Skip to content

Decide which PR evidence fields are required for each provider #1284

Open

Description

@AlexKantor87

What happened?

#1283 makes every PR evidence field optional, so the CLI stops crashing. Some fields shouldn't be optional. Evidence with no PR URL, no commit SHA or no reviewer name could point at the wrong thing, and today it would be recorded as fine.

Some replies also succeed when they shouldn't. If GitHub's follow-up page of commits or reviews comes back empty, the extra commits or reviews are dropped with no error. The evidence looks complete but isn't.

Expected

We agree a list of required fields for each provider (GitHub, GitLab, Bitbucket, Azure DevOps). Then:

Steps to reproduce

The odd-reply tests from #1283 show what each field does today.

CLI version

All versions.

Activity

  1. AlexKantor87 commented on Oct 21, 2026

    @AlexKantor87
    ContributorAuthor

    Two more questions came up while planning #1283.

    Approvals with no username. If a provider sends an approval without a name, #1283 records it with an empty username. A policy that checks "the approver isn't the author" would pass it. Two unnamed approvals on the same commit would also merge into one. Should an unnamed approval count?

    Entries we can't read. When an item in a list (a commit, a review, a PR) comes back empty, #1283 fails rather than skipping it. Skipping could hide a "changes requested" review. This ticket should confirm that's what we want.

  2. AlexKantor87 commented on Oct 22, 2026

    @AlexKantor87
    ContributorAuthor

    Two more for this ticket, from review of the #1283 PRs.

    Missing dates are sent as 0. A commit with no date is sent with "timestamp": 0, which the server stores as 1 January 1970, not "unknown". Commit timestamps have no omitempty, unlike the PR's own times. Decide whether a missing date should be left out, or count as required.

    Approvals with no identity now fail. Earlier I asked whether an unnamed approval should count. For now, #1283 makes it an error on every provider, because counting it would record approval evidence attributed to nobody. This ticket should confirm that or change it.

  3. AlexKantor87 commented on Oct 22, 2026

    @AlexKantor87
    ContributorAuthor

    Correction to my last comment: approvals with no identity no longer fail.

    GitHub sends a deleted account's review with no author. Failing on it would block every attestation for a PR approved by someone who has since left, with no way round it. So #1283 now does this on every provider:

    • The approval is left out of the approvers list, so it never counts.
    • It stays in the reviews list with an empty name, so the record still shows an unknown account reviewed.
    • Nothing fails.

    This ticket should still confirm that, alongside the other required-field questions.

  4. AlexKantor87 commented on Oct 25, 2026

    @AlexKantor87
    ContributorAuthor

    Another correction, after Marko's review on #1287: unnamed approvals no longer stay in the reviews list either.

    Policies read reviews as well as approvers. So an approval by nobody in reviews could still be counted. #1283 now uses the rule Bitbucket already had on main, on every provider:

    • An entry with no identity is never an approver.
    • In reviews, it's kept only if it requests changes. Dropping that would read as no objection.
    • Nothing fails.

    This ticket should still confirm that.

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