Skip to content

feat(repo-policy-sync): record tool checkout revision - #37

Merged
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
etas-contrib:feat/pr-tool-revision
Sep 11, 2026
Merged

feat(repo-policy-sync): record tool checkout revision#37
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
etas-contrib:feat/pr-tool-revision

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

Generated policy pull requests need to identify the exact checkout that produced them. This is especially important for downstream repositories, where the checkout running the tool can differ from the upstream tool repository and may contain local changes.

What changed

  • Add the running checkout’s short Git commit hash to the generated pull-request template.
  • Append -dirty when Git reports tracked or index changes.
  • Fail with an actionable error when the current directory has no usable Git metadata.
  • Add coverage for clean, dirty, and missing-Git cases.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Revision validation occurs after branch pushes and can leave remote state inconsistent when Git metadata is unavailable.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds tool-checkout revision provenance to generated policy pull requests.

Changes:

  • Records the short Git hash and dirty state.
  • Adds revision details to the PR template.
  • Tests clean, dirty, and missing-metadata cases.
File summaries
File Description
repo_policy_sync/src/github.py Resolves and injects the tool revision.
repo_policy_sync/templates/pull_request.md Displays revision provenance.
repo_policy_sync/tests/test_github.py Covers revision behavior and rendering.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread repo_policy_sync/src/github.py Outdated

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That is for sure useful and needed.

@AlexanderLanin
AlexanderLanin merged commit 613c64c into eclipse-score:main Sep 11, 2026
3 checks passed
@AlexanderLanin
AlexanderLanin deleted the feat/pr-tool-revision branch September 11, 2026 09:34
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.

3 participants