從「自己寫完就好」走到「有人使用,我知道怎麼接住問題」
你現在一個人開發,有問題時別人口頭告訴你,你直接修改,這個流程沒有錯。GitHub Issue、Pull Request(PR)與 Actions 不是每個小修改都必須使用的儀式,而是當口頭記憶開始不夠、修改風險提高,或陌生人也能使用專案時,替你保留線索與減少重複檢查的工具。
上一單元你是送出 PR 的 Contributor。這一單元換到另一側:你是決定專案要接受什麼、如何回覆,以及何時可以安全合併的 Maintainer。
這裡教的是「一個人維護小型公開專案」的最低實用流程,不要求你模仿大型公司的制度。
先判斷要不要留下 Issue
Issue 可以把它想成專案專用的待辦與討論紀錄。不是所有事情都要開 Issue:
- 拼字錯誤、幾分鐘內能修好:直接修改並 commit 即可。
- 現在沒空處理、問題偶爾發生:先建 Issue,避免忘記。
- 無法重現或需要向回報者追問:用 Issue 集中補資料。
- 修改可能影響多個功能:先記錄範圍,再開 branch 修正。
- 公開使用者回報:保留 Issue,讓對方看得到處理狀態。
- 密碼、Token 或安全漏洞:不要要求對方公開貼出細節,改用私下安全管道。
一個夠用的 bug Issue 只要回答五件事:
- 使用哪個版本與作業系統?
- 做了哪些操作?
- 原本預期看到什麼?
- 實際發生什麼?
- 有沒有錯誤訊息或截圖?
資訊不足時,可以這樣回:
謝謝你回報,我目前還無法重現。
可以請你補充程式版本、作業系統、操作步驟、
預期結果與實際錯誤訊息嗎?請不要貼出密碼或 Token。
Maintainer 可以說「目前不做」
公開 repository 不代表你必須接受所有需求。對方的建議可能合理,但會增加伺服器、帳號、資料庫、安全或長期維護責任;如果不符合專案定位,可以禮貌而明確地拒絕。
謝謝你的建議。這個專案目前刻意維持離線與免登入,
加入帳號同步會改變隱私與維護範圍,因此目前不規劃實作。
我會關閉這個 Issue,但保留討論內容供未來參考。
不要因為不好意思就承諾不確定的日期。說清楚「接受」、「需要更多資訊」、「目前不規劃」或「與另一個 Issue 重複」,都比長期沒有結論更負責任。
收到 Pull Request,先回答五個問題
外部貢獻者送來 PR 時,不需要立刻讀懂所有高深語法。先依序確認:
- PR 想解決什麼?有沒有連結對應 Issue?
- 這個改動符合專案範圍嗎?
- diff 是否只包含相關修改?
- 自動檢查與原本功能是否正常?
- 你看得懂修改,而且願意在未來維護它嗎?
GitHub review 常見三種結果:
Comment:詢問、討論,或提出不影響合併的建議。Approve:你已檢查並同意合併。Request changes:有必要修正的問題,完成前不應合併。
要求修改時要指出具體位置、影響與期望結果,不要只寫「這樣不好」。例如:
目前空白檔案會讓程式在第 42 行發生錯誤。
請補上空白輸入的處理與一個對應測試,完成後我會再 review。
GitHub Actions 是自動檢查站
Actions 可以在有人 push 或提出 PR 時,自動執行你指定的工作。常見結構是:
workflow(整份自動流程)
└─ job(例如 test)
├─ step:取得程式碼
├─ step:安裝套件
└─ step:執行測試
workflow 通常放在 .github/workflows/*.yml。下面只是看懂結構的最小範例,不要求你現在就為每個專案建立:
name: PR 檢查
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 取得程式碼
uses: actions/checkout@v6
- name: 安裝套件
run: npm ci
- name: 執行測試
run: npm test
Checks 顯示綠燈,代表「你事先設定的檢查通過」,不代表需求一定正確、程式一定安全或日後一定好維護。紅燈也不一定全是貢獻者寫錯,workflow、測試案例或執行環境本身也可能有問題;先打開失敗的 job 與 step 看 log,再做判斷。
外部 PR 的程式碼尚未受信任。不要把 secrets 寫進 workflow 或程式碼,也不要為了方便,讓外部程式在未經確認時取得高權限。
一個人也可以為較大的修改開 PR
自己的小專案不必規定每個改動都開 PR。可以用風險決定:
- 小修改、低風險:直接 commit。
- 修改多個檔案:使用 branch。
- 可能破壞原功能:使用 branch,再開 PR 看一次完整 diff 與 checks。
- 想留下決策與驗證紀錄:使用 Issue 加 PR。
這不是假裝有團隊,而是替「幾天後的自己」準備一個合併前檢查點。
個人維護的最小完整流程
收到回報
→ 判斷是否需要 Issue
→ 補齊版本、步驟與錯誤資訊
→ 決定接受、延後或婉拒
→ 使用 branch 修改,必要時建立 PR
→ 查看 Actions checks 與 diff
→ Comment/Approve/Request changes
→ Merge
→ 回覆修正版本並關閉 Issue
合併只是程式工作的終點,不是溝通的終點。最後留一句「已修正、在哪個版本可用」,未來的你與回報者都會比較容易確認結果。
後續進階單元先保留
完成整套個人課程後,可以再逐步加入企業或大型開源專案常用的內容:Issue forms、branch protection、required reviewers、CODEOWNERS、GitHub Projects、Actions matrix 與 cache、自動部署、release automation、secrets 權限,以及 self-hosted runner。
現在不需要先學完這些才能維護小專案;遇到實際需求時,再一次增加一項即可。
Move from “I finished it” to “I know how to receive problems”
When you develop alone, it is perfectly fine for someone to tell you about a problem and for you to fix it directly. GitHub Issues, Pull Requests (PRs), and Actions are not rituals for every tiny change. They are tools that preserve clues and reduce repeated checking when memory is not enough, the risk grows, or strangers can use your project.
In the previous unit you were the Contributor sending a PR. Here you move to the other side: you are the Maintainer who decides what the project accepts, how to respond, and when a merge is safe.
This is the smallest useful workflow for maintaining a small public project alone. You do not need to copy a large company's process.
Decide whether to keep an Issue
Think of an Issue as a project-specific todo item and discussion record. Not everything needs one:
- A typo or a fix that takes a few minutes: edit and commit directly.
- No time to handle it now, or the problem happens occasionally: create an Issue so it is not forgotten.
- The problem cannot be reproduced or needs questions: use the Issue to collect details.
- A change may affect several features: record the scope, then create a branch.
- A report from a public user: keep the Issue so they can see its status.
- A password, token, or security vulnerability: do not ask for public details; use a private, secure channel.
A useful bug Issue answers five questions:
- Which version and operating system were used?
- What actions were taken?
- What was expected?
- What actually happened?
- Is there an error message or screenshot?
When information is missing, you can reply:
Thanks for the report. I cannot reproduce it yet.
Could you add the project version, operating system, steps,
expected result, and actual error? Please do not share passwords or tokens.
A Maintainer can say “not now”
A public repository does not mean you must accept every request. A suggestion may be reasonable but still add server, account, database, security, or long-term maintenance responsibilities. If it does not fit the project, decline politely and clearly.
Thanks for the suggestion. This project intentionally stays offline and login-free.
Adding account sync would expand its privacy and maintenance scope, so it is not planned now.
I will close this Issue while keeping the discussion for future reference.
Do not promise an uncertain date just to be polite. “Accepted”, “needs more information”, “not planned”, or “duplicate” are all more responsible than leaving a request without a conclusion.
Five questions for an incoming Pull Request
- What does the PR solve? Is there a related Issue?
- Does the change fit the project scope?
- Does the diff contain only related changes?
- Do automatic checks and the existing features still work?
- Do you understand the change and want to maintain it later?
GitHub review has three common outcomes:
Comment: ask, discuss, or suggest a non-blocking improvement.Approve: you checked it and agree to merge.Request changes: a necessary fix is required before merging.
When requesting changes, point to the exact location, impact, and expected result. Do not only say “this is bad”.
GitHub Actions is an automatic check station
Actions can run your chosen work when someone pushes or opens a PR. A workflow contains jobs, and jobs contain steps such as checking out code, installing packages, and running tests:
name: PR checks
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install packages
run: npm ci
- name: Run tests
run: npm test
A green check means the checks you configured passed. It does not prove that the requirements are right, the code is secure, or future maintenance will be easy. A red check may come from the workflow, test cases, or environment, so read the failed job and step logs before judging.
Code from an external PR is not trusted yet. Never put secrets in a workflow or source code, and do not give outside code high privileges just for convenience.
You can open a PR for a larger solo change
Use risk to decide:
- Small, low-risk change: commit directly.
- Several files: use a branch.
- Could break existing behaviour: use a branch, then open a PR to review the full diff and checks.
- Want a decision and verification record: use an Issue plus a PR.
This is not pretending to have a team. It is leaving a merge checkpoint for yourself a few days later.
The smallest complete solo-maintainer loop
Receive report
→ Decide whether an Issue is needed
→ Collect version, steps, and error details
→ Accept, postpone, or decline
→ Fix on a branch and open a PR when useful
→ Read the diff and Actions checks
→ Comment / Approve / Request changes
→ Merge
→ Tell the reporter the fixed version and close the Issue
Merging ends the code change, not the communication. Leave a final note such as “fixed in version X” so both you and the reporter can confirm the result later.
Advanced units can wait
After finishing the personal course, you can add enterprise and large open-source topics gradually: Issue forms, branch protection, required reviewers, CODEOWNERS, GitHub Projects, Actions matrices and caches, automatic deployment, release automation, secret permissions, and self-hosted runners.
You do not need all of these to maintain a small project. Add one only when a real need appears.