[PR #469] [MERGED] Add coverage for upstream push authorship notes #496

Closed
opened 2026-03-02 04:13:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/git-ai-project/git-ai/pull/469
Author: @Copilot
Created: 2/7/2026
Status: Merged
Merged: 2/7/2026
Merged by: @svarlamov

Base: mainHead: copilot/fix-git-push-authorship-notes


📝 Commits (4)

📊 Changes

1 file changed (+85 additions, -0 deletions)

View changed files

tests/push_upstream_authorship.rs (+85 -0)

📄 Description

Authorship notes were reported missing on remotes when users push with upstream-setting flags (e.g., git push -u origin HEAD) or after setting upstream with git branch -u. This PR adds targeted end-to-end coverage to validate those flows.

  • Coverage: upstream push with -u/--set-upstream
    • Ensures a push that configures tracking also syncs refs/notes/ai to the remote.
  • Coverage: push after git branch -u
    • Ensures subsequent pushes after manually setting upstream also sync notes.

Example:

local.git(&["push", "-u", "origin", "HEAD"])?;
let note = read_remote_authorship_note(&upstream, &commit.commit_sha);
assert!(note.is_some());

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Open with Devin

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/git-ai-project/git-ai/pull/469 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/7/2026 **Merged by:** [@svarlamov](https://github.com/svarlamov) **Base:** `main` ← **Head:** `copilot/fix-git-push-authorship-notes` --- ### 📝 Commits (4) - [`d010bd3`](https://github.com/git-ai-project/git-ai/commit/d010bd361ca2af1554063aad3f54f67af16b64e7) Initial plan - [`2067e87`](https://github.com/git-ai-project/git-ai/commit/2067e87cffea0f5c40053a298b00b0e07340c493) Add tests for upstream authorship pushes - [`0cd82fd`](https://github.com/git-ai-project/git-ai/commit/0cd82fd752513452a2520787563c61608da3672a) Tidy upstream authorship test naming - [`8dc70f6`](https://github.com/git-ai-project/git-ai/commit/8dc70f6bd70eca12d90d81e4302a58bfc0e2fbe3) cargo fmt ### 📊 Changes **1 file changed** (+85 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/push_upstream_authorship.rs` (+85 -0) </details> ### 📄 Description Authorship notes were reported missing on remotes when users push with upstream-setting flags (e.g., `git push -u origin HEAD`) or after setting upstream with `git branch -u`. This PR adds targeted end-to-end coverage to validate those flows. - **Coverage: upstream push with `-u/--set-upstream`** - Ensures a push that configures tracking also syncs `refs/notes/ai` to the remote. - **Coverage: push after `git branch -u`** - Ensures subsequent pushes after manually setting upstream also sync notes. Example: ```rust local.git(&["push", "-u", "origin", "HEAD"])?; let note = read_remote_authorship_note(&upstream, &commit.commit_sha); assert!(note.is_some()); ``` <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/git-ai-project/git-ai/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/469" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:13:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#496
No description provided.