Skip to content

feat: CLI command + gha workflow to contribute patches back to source#9

Merged
kelly-sovacool merged 21 commits into
mainfrom
contribute
Jun 25, 2026
Merged

feat: CLI command + gha workflow to contribute patches back to source#9
kelly-sovacool merged 21 commits into
mainfrom
contribute

Conversation

@kelly-sovacool

@kelly-sovacool kelly-sovacool commented Jun 22, 2026

Copy link
Copy Markdown
Member

Changes

adds syncweaver contribute command and corresponding gha workflow template to contribute patches back to source repos.

Issues

resolves #4

PR Checklist

(Strikethrough any points that are not applicable.)

  • This comment contains a description of changes with justifications, with any relevant issues linked.
  • Write unit tests for any new features, bug fixes, or other code changes.
  • Update docs if there are any API changes.
  • Update CHANGELOG.md with a short description of any user-facing changes and reference the PR number. Guidelines: https://keepachangelog.com/en/1.1.0/

@kelly-sovacool kelly-sovacool changed the title feat: workflow to contribute patches back to source feat: CLI command + gha workflow to contribute patches back to source Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an initial “contribute patch back upstream” capability by adding a syncweaver contribute CLI command plus a GitHub Actions workflow template, backed by new metadata-resolution and PR-opening logic in syncweaver.contribute_patch.

Changes:

  • Add syncweaver contribute CLI subcommand that resolves lockfile/patch metadata and opens a PR in the source repository.
  • Add syncweaver-contribute-patch.yml workflow template to apply a tracked patch to a source repo and open a PR via workflow_dispatch.
  • Add unit tests covering token resolution, metadata resolution, and contribute command behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_contribute_patch.py Adds tests for token resolution, lockfile-driven metadata resolution, and PR-opening flow.
tests/test_cli.py Extends CLI tests to cover the new contribute command and help output.
src/syncweaver/templates/syncweaver-contribute-patch.yml New workflow template to resolve patch metadata and open a PR in the source repo.
src/syncweaver/templates/init.py Registers the new workflow template and updates template inventory docs/descriptions.
src/syncweaver/contribute_patch.py Implements metadata resolution, token resolution, patch application + push + PR creation.
src/syncweaver/cli/main.py Wires the new contribute command into the top-level CLI.
src/syncweaver/cli/contribute.py Implements the syncweaver contribute Click command and its options.

Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/cli/main.py
kelly-sovacool and others added 5 commits June 25, 2026 08:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.

Comment thread tests/test_contribute_patch.py
Comment thread src/syncweaver/contribute_patch.py
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py Outdated
Comment thread src/syncweaver/contribute_patch.py
Comment thread src/syncweaver/contribute_patch.py Outdated
kelly-sovacool and others added 10 commits June 25, 2026 10:28
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread src/syncweaver/cli/contribute.py
@kelly-sovacool kelly-sovacool merged commit 76ef2ff into main Jun 25, 2026
7 checks passed
@kelly-sovacool kelly-sovacool deleted the contribute branch June 25, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contribute changes in patch back to source repo

2 participants