pickman: Add GitLab integration to push and create MRs

Add -p/--push option to the apply command to push the cherry-pick branch
to GitLab and create a merge request. Uses the python-gitlab library.

Options:
  -p, --push     Push branch and create GitLab MR
  -r, --remote   Git remote for push (default: ci)
  -t, --target   Target branch for MR (default: master)

Requires GITLAB_TOKEN environment variable to be set.

Also record cherry-pick history in .pickman-history file on successful
apply. Each entry includes the date, source branch, commits, and the
agent's conversation log. This file is committed automatically and
included in the MR description when using -p.

Name the module gitlab_api.py to avoid shadowing the python-gitlab
library.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-15 11:24:00 -07:00
committed by Simon Glass
parent 616e0abb7b
commit b03663be7b
5 changed files with 169 additions and 5 deletions

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@
.*
!.claude
!.checkpatch.conf
!.pickman-history
*.a
*.asn1.[ch]
*.bin