feat: switch CI pipeline from pypi.org to Forgejo PyPI #5
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/gmail-sdk!5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "4-switch-ci-to-forgejo-pypi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Switch the gmail-sdk CI pipeline from publishing to public pypi.org to the private Forgejo PyPI registry. Replaces the old
.woodpecker.yamlwith a new.woodpecker.ymlfollowing the proven woodpecker-sdk template pattern. Adds standardized ruff configuration and applies formatting fixes.Closes #4
Changes
.woodpecker.yaml-- old pipeline that published to pypi.org via tag events with a repo-levelpypi_tokensecret.woodpecker.yml-- new pipeline with three steps:ruff check+ruff format --checkonsrc/andtests/(pinnedruff==0.15.2)pip install -e ".[dev]"+pytest tests/ -vpython -m build+twine uploadto Forgejo PyPI using global secrets (forgejo_pypi_url,forgejo_publish_user,forgejo_publish_token), triggered only on push to mainpyproject.toml-- added[tool.ruff]config (py310, line-length 120, E/F/W/I rules)Test Plan
ruff check src/ tests/passes with zero errorsruff format --check src/ tests/passes (all files formatted)pytest tests/ -v-- 59/59 unit tests pass; 12 integration tests error due to missing OAuth credentials (expected, same as before this change)Review Checklist
.woodpecker.yamldeleted (prevents dual-config loading).woodpecker.ymlfollows woodpecker-sdk template exactlypypi_token)event: push, branch: mainRelated Notes
plan-2026-03-01-forgejo-pypi-migration-- Phase 2, gmail-sdk repoplan-2026-02-28-woodpecker-sdk-mcp-- Phase 2 established the pipeline templatewoodpecker-sdk/.woodpecker.ymlPR #5 Review
BLOCKERS
None.
NITS
None.
CODE REVIEW
Pipeline (.woodpecker.yml): Matches the woodpecker-sdk reference template exactly. All three steps (lint, test, publish) are correctly configured. The test step correctly omits the
WOODPECKER_URL/WOODPECKER_TOKENenvironment variables from the reference template since gmail-sdk does not need Woodpecker API access for its tests -- this is a correct per-repo adaptation as specified in the plan.when: event: [push, pull_request]-- correctruff==0.15.2pinned, checkssrc/andtests/-- correctpip install -e ".[dev]",pytest tests/ -v-- correct$$FORGEJO_PYPI_URL,$$FORGEJO_PUBLISH_USER,$$FORGEJO_PUBLISH_TOKENviafrom_secretglobals -- correctevent: push, branch: main-- correctOld pipeline (.woodpecker.yaml): Fully deleted. Prevents dual-config loading issue documented in Phase 1 lessons learned.
Ruff config (pyproject.toml):
target-version = "py310",line-length = 120,select = ["E", "F", "W", "I"]-- matches platform standard.Source changes (6 .py files in src/ and tests/): All changes are mechanical ruff formatting:
Irule)No logic changes detected. No behavioral impact.
No secrets, .env files, or credentials committed. All 12 changed files are pipeline config, pyproject.toml, and Python source/test files.
SOP COMPLIANCE
4-switch-ci-to-forgejo-pypifor issue #4)template-pr-body(Summary, Changes, Test Plan, Review Checklist, Related Notes)plan-2026-03-01-forgejo-pypi-migration)VERDICT: APPROVED