Skip to content

patchscan: fix PR body quoting and provenance checks#399

Closed
nirmoy wants to merge 3 commits into
NVIDIA:github-actionsfrom
nirmoy:patchscan-buglink-existence-only
Closed

patchscan: fix PR body quoting and provenance checks#399
nirmoy wants to merge 3 commits into
NVIDIA:github-actionsfrom
nirmoy:patchscan-buglink-existence-only

Conversation

@nirmoy
Copy link
Copy Markdown
Collaborator

@nirmoy nirmoy commented Apr 28, 2026

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

Referenced report 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...).
  • The workflow later failed with exit 127 because markdown code spans in the PR body were interpolated directly into a shell script and bash tried 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.
  • Preserve the existing UBUNTU-local commit handling so UBUNTU: [Config] ... commits do not require upstream provenance.

Validation:

@nirmoy nirmoy requested a review from ianm-nv April 28, 2026 14:55
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 force-pushed the patchscan-buglink-existence-only branch from 2e132c2 to 18e4dc4 Compare May 4, 2026 14:31
@nirmoy nirmoy changed the title validate-pr: relax Launchpad bug link check to existence only patchscan: fix PR body quoting and provenance checks May 6, 2026
@nirmoy
Copy link
Copy Markdown
Collaborator Author

nirmoy commented May 11, 2026

Closing as superseded by merged PR #410.

@nirmoy nirmoy closed this May 11, 2026
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.

1 participant