feat(stack): add 'mergify stack note' command#1267
Conversation
|
This pull request is part of a Mergify stack:
|
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
Pull request overview
Adds a new mergify stack note command to attach free-text “why was this commit amended” notes to commits via git-notes, and updates stack setup to make those notes visible in plain git log by configuring notes.displayRef.
Changes:
- Introduce
mergify stack notecommand and implementation for add/append/remove + editor fallback. - Update
stack setupto configurenotes.displayReffor Mergify notes visibility. - Add/adjust tests for the new command and setup behavior; update README command list.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mergify_cli/stack/note.py | New git-notes based “stack note” implementation (add/append/remove, editor flow). |
| mergify_cli/stack/cli.py | Wire new stack note command into Click CLI. |
| mergify_cli/stack/setup.py | Configure notes.displayRef during stack setup. |
| mergify_cli/tests/stack/test_note.py | New end-to-end style tests for note behavior. |
| mergify_cli/tests/stack/test_setup.py | Extend setup tests to cover/handle notes.displayRef configuration. |
| README.md | Document the new command in the command table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Attach free-text "why was this commit amended" notes to commits. Notes live in refs/notes/mergify/stack, a dedicated leaf under the refs/notes/mergify/ namespace (sibling to the MQ note refs). `mergify stack setup` appends refs/notes/mergify/* to notes.displayRef so plain `git log` shows all mergify notes (both stack and MQ) automatically. Usage: mergify stack note [-m MESSAGE] [--append] [--remove] [COMMIT] - COMMIT defaults to HEAD; accepts SHA prefix or Change-Id prefix. - -m MESSAGE attaches the note inline; without it, $GIT_EDITOR opens with a template where comment lines (starting with #) are stripped. - --append concatenates to an existing note. - --remove deletes the note (idempotent). This is the first of two PRs for the stack-notes feature. This PR adds the command surface and local visibility via `git log`. A follow-up PR pushes the notes ref to the remote and surfaces the reasons in the revision-history PR comment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Change-Id: I33cc921fb2caac6a31d2284b2ef76d0429b510ef
6932dd2 to
b188fe3
Compare
Revision history
|
Merge Queue Status
This pull request spent 5 minutes 32 seconds in the queue, including 5 minutes 5 seconds running CI. Required conditions to merge
|
Attach free-text "why was this commit amended" notes to commits. Notes
live in refs/notes/mergify/stack, a dedicated leaf under the
refs/notes/mergify/ namespace (sibling to the MQ note refs).
mergify stack setupappends refs/notes/mergify/* to notes.displayRef so plaingit logshows all mergify notes (both stack and MQ) automatically.Usage:
mergify stack note [-m MESSAGE] [--append] [--remove] [COMMIT]
with a template where comment lines (starting with #) are stripped.
This is the first of two PRs for the stack-notes feature. This PR adds
the command surface and local visibility via
git log. A follow-up PRpushes the notes ref to the remote and surfaces the reasons in the
revision-history PR comment.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com