Skip to content

Commit ed185da

Browse files
committed
Add repository agent instructions
ghstack-source-id: 24f813d ghstack-comment-id: 4416422554 Pull-Request: #349
1 parent fcb8acb commit ed185da

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ghstack development
2+
3+
## Lint
4+
5+
Run `python -m black src/ghstack/` and `python -m flake8 src/ghstack/` to fix and check lint before committing. If lint fixes are needed after a commit, amend the commit rather than creating a separate lint fix commit.
6+
7+
## ghstack trailers
8+
9+
When rewriting, splitting, rebasing, or autosquashing a ghstack stack, preserve existing `ghstack-source-id`, `ghstack-comment-id`, and `Pull-Request` trailers on each logical commit. Before submitting a rewritten stack, compare commit messages against the saved/pre-rewrite commits or search local history for an existing `Pull-Request` trailer with the same subject. If a logical commit was already submitted, keep its existing `Pull-Request` and `ghstack-comment-id` instead of letting ghstack create a new PR.

0 commit comments

Comments
 (0)