submit-issue-work
Submit completed work for a OneDev issue. Use when the user asks to submit, complete, or finish issue work.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Submit completed work for a OneDev issue. Use when the user asks to submit, complete, or finish issue work.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Work on a OneDev pull request. Use when the user asks to review, merge, resolve merge conflicts, approve, request changes, address feedback, investigate or fix a failed build, improve, or continue PR work.
Implement work for a OneDev issue. Use when the user asks to start, pick up, or continue issue work.
Submit completed work for an existing OneDev pull request. Use when the user asks to submit, complete, or finish PR work.
Operate OneDev issues, pull requests, builds, and projects with `tod`. Use for general OneDev queries and actions not covered by a more specific skill.
Fix a prompt-specified failed OneDev build when the request has no issue or pull request context.
Compose a Git commit message that satisfies applicable OneDev branch and pull request requirements. Use when the user asks to draft or generate a commit message. Do not use when running work-on-pull-request, submit-issue-work, or submit-pull-request-work -- those workflows compose commit messages themselves.
| name | submit-issue-work |
| description | Submit completed work for a OneDev issue. Use when the user asks to submit, complete, or finish issue work. |
Submit code changes and/or saved comments for an issue.
tod is installed and configured.This workflow pairs with work-on-issue. At the start, recover
<saved-issue-comments> from the same chat session:
work-on-issue run -- use the exact drafted comment text
presented or amended earlier in this session.<saved-issue-comments>.<saved-issue-comments> is empty.<saved-issue-comments> is session state, not a file on disk and not comments
already on OneDev. Step 7 posts these deferred drafts.
Run the workflow sequentially. Before aborting it for any reason, always follow
this section. If current user is an AI user and <issue-reference> is known,
immediately run
tod issue add-comment <issue-reference> '<reason>' to explain the stop reason.
Report the reason, including the command and error when applicable, and stop.
If current user is an AI user, do not ask the current user for direction in this workflow. When you would otherwise ask a question, post a concise issue comment explaining the blocker or needed decision, then stop:
tod issue add-comment <issue-reference> '<reason>'
When passing authored text such as Markdown comments, commit messages, PR
titles, or PR descriptions to a shell command, quote it so the shell preserves
it literally. Prefer a single-quoted argument, and escape any literal single
quote inside the text as '\''. Do not wrap text containing backticks in double
quotes, as the shell will treat backticks as command substitution before the
command receives the text.
In authored OneDev Markdown, write <type> <reference>, where type is
issue, pr (or pull request), or build. Use #123 in the same project,
path/to/project#123 across projects, or PROJ-123 when the project has a
key. A bare #123 always means an issue; never use it for a PR or build.
These forms differ from tod command arguments.
Given an optional <issue-reference> (e.g. 123, #123, myproject#123,
or PROJ-123):
Resolve the issue reference. If the user prompt or session context
already provides <issue-reference>, use it. Otherwise derive it from the
working directory:
tod issue current-reference
Save non-empty output as <issue-reference>. If the output is empty, stop
and report that the issue reference could not be derived.
Check whether code can be submitted.
git symbolic-ref --short HEAD 2>/dev/null
Save successful output as <current-branch>. If there is no branch, skip to
step 7 to apply saved issue comments, and continue with rest steps.
Verify the current branch.
tod issue get <issue-reference>
tod project current
tod remote
git fetch <remote> <issue-branch>
git rev-parse --abbrev-ref <current-branch>@{upstream}
Save the issue detail as <issue> and get <issue-branch> from that
response. If the branch is missing from the issue detail, report that the
issue does not have a branch on the server yet and stop. Save the other
outputs as <current-project>, <remote>, and <upstream>. Verify that
<current-project> equals the issue project, <current-branch> equals
<issue-branch>, and <upstream> equals <remote>/<issue-branch>. If any
check fails, report the mismatch and stop.
Find the PR, or plan to create one.
tod pr list --query 'includes issue "<issue-reference>" and open'
tod pr get <pr-reference>
Record the PR reference, URL, source, and target values.Commit code changes when the working copy is dirty.
git status --porcelain
If the output is empty, skip this step. Otherwise inspect the diff and
compose the message here (do not use the generate-commit-message skill)
from:
tod get-commit-message-requirement
tod pr get-commit-message-requirement --target-project <target-project> --target-branch <target-branch>
Pass the existing or planned PR target values from step 4. Satisfy all non-empty requirements and ask the user to confirm the full message before running:
git add -A
git commit -m '<subject>' -m '<body>'
git status --porcelain
The final status must be clean.
Push outstanding commits and create a PR when needed.
git log --reverse --pretty=format:'%h %s%n%b%n---' <remote>/<issue-branch>..HEAD
Save the output as <commits-to-push>. If it is empty, skip the push and
PR creation and continue to deferred comments or state changes. Otherwise:
git push <remote> <issue-branch>
tod pr get-title-and-description-requirement --target-project <target-project> --target-branch <target-branch>
Compose a concise title and description from the captured commits,
validate them, then run:
tod pr create '<title>' --description '<description>' --target-project <target-project> --target-branch <target-branch>
Pass the resolved target project and target branch values. Save the
returned PR reference and URL.After the existing PR is updated or the new PR is created:
<saved-issue-comments> contains exactly one comment,
combine the PR mention with it. Otherwise, append the PR mention to
<saved-issue-comments> as a separate comment.Apply deferred OneDev changes. Post <saved-issue-comments>, whether or
not this workflow submitted code. If code submission started and then
failed, do not post saved comments.
<saved-issue-comments> is non-empty, post every comment -- do not
skip because a PR description already covers the same ground.<saved-issue-comments> is empty and no code was submitted, report
that there is nothing to submit.For each comment in <saved-issue-comments>, run:
tod issue add-comment <issue-reference> '<comment>'
Restore the previous branch and clean up the current branch if applicable.
git rev-parse --abbrev-ref @{-1} 2>/dev/null
Save successful output as <previous-branch>. If the command fails or returns
an empty value, stop.
<current-branch> was not recorded in step 2:
git checkout <previous-branch>
<current-branch> differs from <previous-branch>:
git checkout <previous-branch>
git branch -d <current-branch>
<current-branch> equals <previous-branch>, do nothing.