Commit Graph

6 Commits

Author SHA1 Message Date
Simon Glass
9d2495c0bf pickman: Fix 80-column line length compliance
Break long lines to comply with 80-character limit and remove trailing
whitespace across agent.py, control.py, database.py, gitlab_api.py, and
__main__.py

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-24 13:56:12 -07:00
Simon Glass
476abbac95 pickman: Add database tracking for comment processing
Add schema v3 with a processed_comment table to track which MR comments
have been addressed by the review agent. This prevents re-processing
the same comments when running review or poll commands.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-16 16:13:53 -07:00
Simon Glass
173eb9e7c2 pickman: Fix pylint warnings
- Remove unused commit_hashes variable in agent.py
- Add pylint disable for too-many-public-methods in database.py
- Add pylint disable for too-many-arguments in database.py functions
- Add pylint disable for too-many-branches in control.py do_apply()
- Add pylint disable for too-many-lines in ftest.py
- Prefix unused mock arguments with underscore in ftest.py

This brings the pylint score to 10.00/10.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-16 15:49:32 -07:00
Simon Glass
5cae65fea4 pickman: Add pcommit and mergereq tables to database
Add new database tables to track individual commits and merge requests:

- pcommit: tracks commits being cherry-picked with status, author,
  subject, and optional link to merge request
- mergereq: tracks GitLab merge requests with branch name, MR ID,
  status, and URL

Also add helper functions for both tables and update control.py to
write commit status to the database during apply operations.

Update README.rst with documentation for all database tables.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-16 13:15:19 +00:00
Simon Glass
11b1f8fdd8 pickman: Add list-sources command
Add a command to list all tracked source branches and their last
cherry-picked commits from the database.

Usage: ./tools/pickman/pickman list-sources

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-16 13:15:19 +00:00
Simon Glass
23c4d2be3c pickman: Add database for tracking cherry-pick state
Add an sqlite3 database module to track the state of cherry-picking
commits between branches. The database uses .pickman.db and includes:

- source table: tracks source branches and their last cherry-picked
  commit into master
- Schema versioning for future migrations

The database code is mostly lifted from patman

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-16 13:15:19 +00:00