Skip to content

patchscan: fix PR body quoting and provenance checks#410

Merged
ianm-nv merged 4 commits into
NVIDIA:github-actionsfrom
nirmoy:patchscan-pr-validation-fixes
May 11, 2026
Merged

patchscan: fix PR body quoting and provenance checks#410
ianm-nv merged 4 commits into
NVIDIA:github-actionsfrom
nirmoy:patchscan-pr-validation-fixes

Conversation

@nirmoy
Copy link
Copy Markdown
Collaborator

@nirmoy nirmoy commented May 6, 2026

Fix PR Validation false failures reported from #407 and confirmed against #409.

References from PR #407:

  • validate-pr reported 6b97c1b33bef ("vfio/hisi: Convert to the get_region_info op") as missing upstream provenance even though the commit has (backported from commit e238f147d517...).
  • A later PR Validation run failed with exit 127 because markdown code spans in the PR body were interpolated directly into a shell script, causing bash to execute text such as get_region_info.

Changes:

  • Write PR title/body by fetching PR JSON with gh api and extracting fields with jq, instead of embedding ${{ github.event.pull_request.body }} directly into the shell script.
  • Teach validate-pr to recognize (backported from commit <sha>) and Upstream commit <sha> as upstream SHA provenance.
  • Treat UBUNTU: ... local commits, such as UBUNTU: [Config] ..., as local-only so they do not require upstream provenance.
  • Relax the Launchpad requirement to accept a https://bugs.launchpad.net/... link anywhere in the PR body.

Validation:

nirmoy added 3 commits May 6, 2026 12:41
Two improvements addressing false-positive failures on tracked-branch PRs:

1. Launchpad bug link: drop the requirement that the URL appear on a
   line prefixed with 'BugLink:' or 'LP:'.  The check now only ensures
   a https://bugs.launchpad.net/... URL exists somewhere in the PR body.
   Avoids false negatives when authors paste the link in prose.

2. UBUNTU-local commits (e.g. 'UBUNTU: [Config] ...', 'UBUNTU: [Packaging] ...',
   'UBUNTU: SAUCE: ...') have no upstream equivalent and previously triggered
   R6 ("not SAUCE/Revert but has no upstream reference trailer").  Add an
   is_ubuntu_local() helper that matches the 'UBUNTU: ' prefix; exempt those
   commits from R6 and R9, label them [UBUNTU] in the digest table, and
   verify only the Signed-off-by trailer is present.

Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
@nirmoy nirmoy requested a review from ianm-nv May 8, 2026 16:25
Copy link
Copy Markdown
Collaborator

@ianm-nv ianm-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Acked-by: Ian May <ianm@nvidia.com>

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

Successfully merging this pull request may close these issues.

2 participants