lov-gh-contribute

Featured

Contribute a clean, professional pull request to someone else's GitHub repository: fork → clone → branch → commit → push → open PR, with smart splitting into one or multiple PRs based on the scope of changes. Trigger when the user says "给这个 repo 提 PR"、"贡献代码"、"fork 然后改再 PR"、 "contribute to this repo", "open a PR to upstream", "submit a PR to <owner>/<repo>".

Data & Documents 68 stars 17 forks Updated today MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# gh-contribute — Clean PRs to Upstream Repos Turn local changes into a clean, professional pull request against an upstream repo you don't own. Handles the full fork → branch → commit → push → PR pipeline, and splits work into multiple PRs when the changes span unrelated concerns. ## When to Use - User wants to contribute to an open-source project they don't have write access to - User already has local edits and needs them shipped as a PR upstream - User asks to "fork this repo and send a PR" - User has mixed changes (e.g. docs + feature + refactor) and wants them split properly ## Non-Goals - Does **not** write code changes — assumes the user (or a prior step) already has the desired modifications in the working tree or in their head - Does **not** review the project's own PRs (see `gh-tidy`) - Does **not** mirror to GitLab/Gitea — GitHub only ## Workflow (MANDATORY) Execute steps in order. Do not skip confirmations. ### Step 1: Identify the target repo Determine the upstream `owner/repo`: 1. If the user pasted a URL or `owner/repo` string → use it 2. Otherwise run `git remote -v` in the current directory and pick the `origin` (if origin is already the user's fork, find the upstream via `gh repo view --json parent`) Record three facts: - `UPSTREAM` — e.g. `ZenMux/zenmux-doc` - `DEFAULT_BRANCH` — from `gh repo view $UPSTREAM --json defaultBranchRef -q .defaultBranchRef.name` - `USER_LOGIN` — from `gh api user -q .login` ### Step 2: Read the contribution ...

Details

Author
lovstudio
Repository
lovstudio/skills
Created
5 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category