Skip to content

chore(git-blame): add formatting commits to ignore revs#1085

Closed
FucciUnavailable wants to merge 2 commits intomicrosoft:mainfrom
FucciUnavailable:chore/add-git-blame-ignore-revs
Closed

chore(git-blame): add formatting commits to ignore revs#1085
FucciUnavailable wants to merge 2 commits intomicrosoft:mainfrom
FucciUnavailable:chore/add-git-blame-ignore-revs

Conversation

@FucciUnavailable
Copy link
Copy Markdown

@FucciUnavailable FucciUnavailable commented Apr 30, 2026

Description

Adding git ignore revs file so we can cleanup the noise from git blame for purely formatting commits

Fixes #690

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s third-party notice generation pipeline (metadata + generator + CI drift check) and introduces a git-blame ignore list for mechanical formatting commits.

Changes:

  • Rename the generated notice artifact from NOTICE.md to NOTICE and update the generator, Makefile targets, and the notice drift CI workflow accordingly.
  • Add a _third_party_submissions block to scripts/notice-metadata.yaml and render it into NOTICE.
  • Add a new .git-blame-ignore-revs file listing formatting/refactor commits to ignore in git blame.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/notice-metadata.yaml Adds _third_party_submissions metadata used to render contributor attribution into the notice output.
scripts/generate-notice.py Updates output path to NOTICE and adds rendering/loading logic for the third-party submissions block.
NOTICE Regenerated output including the new third-party submissions section.
Makefile Updates comment to reflect NOTICE (no extension) generation target.
CHANGELOG.md Adds Unreleased entries describing the notice rename and new submissions section.
.github/workflows/notice-drift.yml Updates workflow comments/UI strings to refer to NOTICE instead of NOTICE.md.
.git-blame-ignore-revs New ignore-revs list to improve git blame signal around formatting-only commits.

Comment thread .git-blame-ignore-revs
Comment thread .git-blame-ignore-revs
Comment thread CHANGELOG.md
Comment on lines +13 to +14
- **Renamed `NOTICE.md` -> `NOTICE`** to follow the Apache / CNCF convention used by upstream third-party-attribution files (e.g. `kubernetes-sigs/kro`, `kubernetes-sigs/headlamp`). The generator (`scripts/generate-notice.py`), `make notice` target, and `NOTICE Drift Check` workflow now operate on the extension-less path. (#1073)
- **NOTICE: added "Submitted on behalf of a third-party" section** crediting five contributors whose pull requests landed before the `microsoft-github-policy-service` CLA bot recorded a signature on file -- in keeping with the section-7 wording adopted by CNCF NOTICE files. Driven by a new `_third_party_submissions` block in `scripts/notice-metadata.yaml`. (#1073)
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The changelog guidance for this repo calls for one entry per PR; these are two separate bullets that both end with (#1073). Please combine into a single concise bullet (or otherwise justify why these should remain split) so the Unreleased section stays scannable and conforms to the project changelog rules.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines 361 to +365
# Trailing blank line between components (and after the last one)
# to match the CELA template -- the file ends `---\n\n`.
out.append("\n")
if tps is not None and tps.contributors:
out.append(render_third_party_submissions(tps))
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The comment says the NOTICE file ends with ---\n\n, but after appending the third-party-submissions block the rendered file now ends with that block (no trailing ---). Please either update the comment to match the new output shape, or add a trailing separator after the third-party section so the file still ends with the same template terminator.

Suggested change
# Trailing blank line between components (and after the last one)
# to match the CELA template -- the file ends `---\n\n`.
out.append("\n")
if tps is not None and tps.contributors:
out.append(render_third_party_submissions(tps))
# Trailing blank line between components (and after the last one).
# If a third-party submissions section is appended below, we still
# preserve the template terminator so the final file ends `---\n\n`.
out.append("\n")
if tps is not None and tps.contributors:
out.append(render_third_party_submissions(tps))
out.append("---\n\n")

Copilot uses AI. Check for mistakes.
@FucciUnavailable
Copy link
Copy Markdown
Author

microsoft-github-policy-service agree

@danielmeppiel
Copy link
Copy Markdown
Collaborator

Thanks for sending this @FucciUnavailable, but closing as not-needed.

The two SHAs in the proposed file (2340fc77, 962fffd3) are pre-Ruff Black formatting commits. APM has since migrated to Ruff (ruff check + ruff format -- see .apm/instructions/linting.instructions.md), so those legacy commits aren't representative of the current formatting baseline.

#690 asks for adopting Ruff, which is already done -- I'll close that too as completed by the migration.

If we ever do a one-shot ruff format mass-rewrite worth hiding from blame, we can add a .git-blame-ignore-revs then with the right SHA. For now this would just ship dead bytes.

@FucciUnavailable
Copy link
Copy Markdown
Author

Makes sense! Thank you for reviewing!

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.

[FEATURE] PEP 8 Support

3 participants