Merge pull request 'fix/pr-confirm' (#20) from fix/pr-confirm into develop
Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
+3
-3
@@ -31,7 +31,7 @@ Every PR targets the next rung up. Skipping a rung is forbidden.
|
|||||||
4. Run `git checkout -b {target branch} origin/{base branch}` so the branch starts at the remote base, then bring step 1's commits onto it (`git cherry-pick` them when they landed on another branch). Done when `git branch --show-current` prints the target branch and `git log --oneline origin/{base branch}..HEAD` lists exactly step 1's commits.
|
4. Run `git checkout -b {target branch} origin/{base branch}` so the branch starts at the remote base, then bring step 1's commits onto it (`git cherry-pick` them when they landed on another branch). Done when `git branch --show-current` prints the target branch and `git log --oneline origin/{base branch}..HEAD` lists exactly step 1's commits.
|
||||||
5. Run `git push -u origin {target branch}`. Done when `git ls-remote --heads origin` shows the target branch's ref.
|
5. Run `git push -u origin {target branch}`. Done when `git ls-remote --heads origin` shows the target branch's ref.
|
||||||
6. Find out whether the target branch already has an open PR: `jsc-gitea/tools/gitea.sh api GET /repos/{owner}/{repo}/pulls?state=open` and match `head.ref` against the target branch. Done when you hold either one PR number or the fact that there is none; a PR number → skip step 7 and step 8 and go to step 9, because the PR already exists and only needs calibrating.
|
6. Find out whether the target branch already has an open PR: `jsc-gitea/tools/gitea.sh api GET /repos/{owner}/{repo}/pulls?state=open` and match `head.ref` against the target branch. Done when you hold either one PR number or the fact that there is none; a PR number → skip step 7 and step 8 and go to step 9, because the PR already exists and only needs calibrating.
|
||||||
7. Create the PR: `jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}`.
|
7. Create the PR: `jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}`。這一步會先要求確認。
|
||||||
- Title = branch name.
|
- Title = branch name.
|
||||||
- Write the description into a temp file first, using `templates/pr-description.md` (a Traditional Chinese template; the generated description stays in Traditional Chinese per the STE100 output rule).
|
- Write the description into a temp file first, using `templates/pr-description.md` (a Traditional Chinese template; the generated description stays in Traditional Chinese per the STE100 output rule).
|
||||||
- Done when the command prints a PR URL; no URL → report the error and stop.
|
- Done when the command prints a PR URL; no URL → report the error and stop.
|
||||||
@@ -42,8 +42,8 @@ Every PR targets the next rung up. Skipping a rung is forbidden.
|
|||||||
1. Title against the target branch name.
|
1. Title against the target branch name.
|
||||||
2. Description against a freshly drafted description from `templates/pr-description.md`.
|
2. Description against a freshly drafted description from `templates/pr-description.md`.
|
||||||
3. Prerequisite PR dependency against the one the description names.
|
3. Prerequisite PR dependency against the one the description names.
|
||||||
- Title or description differs → write the new description to a temp file and run `jsc-gitea/tools/gitea.sh pr-edit {owner}/{repo} {pr number} "{title}" {description file}`, which carries both items in one call.
|
- Title or description differs → write the new description to a temp file and run `jsc-gitea/tools/gitea.sh pr-edit {owner}/{repo} {pr number} "{title}" {description file}`, which carries both items in one call,且會先要求確認。
|
||||||
- The dependency differs → run `pr-depend` as in step 8.
|
- The dependency differs → run `pr-depend` as in step 8,這一步也會先要求確認。
|
||||||
- All three match → change nothing. Every needless edit notifies every reviewer, so silence is the correct outcome here.
|
- All three match → change nothing. Every needless edit notifies every reviewer, so silence is the correct outcome here.
|
||||||
- Done when each of the three items is reported as either matched or updated, and the number of API calls made equals the number of items that differed.
|
- Done when each of the three items is reported as either matched or updated, and the number of API calls made equals the number of items that differed.
|
||||||
10. If this run follows PR comment fixes and the caller supplied handled comment ids, reply to each comment now with `jsc-gitea/tools/gitea.sh comment-reply`. Rules: `jsc-meta/references/pr-report.md`. Done when every handled comment has a reply URL, or a reported reply failure reason.
|
10. If this run follows PR comment fixes and the caller supplied handled comment ids, reply to each comment now with `jsc-gitea/tools/gitea.sh comment-reply`. Rules: `jsc-meta/references/pr-report.md`. Done when every handled comment has a reply URL, or a reported reply failure reason.
|
||||||
|
|||||||
Reference in New Issue
Block a user