issues-assign
Assign an issue to the current git user.
Arguments
The argument is the issue ID, e.g. 0001 or 1. If the ID is not zero-padded, pad it to 4 digits (e.g. 1 becomes 0001).
Steps
- •Parse the argument as an issue ID. Zero-pad it to 4 digits.
- •Use the Glob tool to verify
.issues/{id}.tomlexists. - •If the file does not exist, inform the user and stop.
- •Run
git config user.emailusing the Bash tool to get the current user's email. - •Read the issue file using the Read tool.
- •Update the
assigned_tofield in the TOML content to the git user's email. Use the Edit tool to replace the existingassigned_toline. - •Append a
[[comments]]entry to the end of the issue file using the Edit tool to log the assignment. Use the current date inYYYY-MM-DDformat. Format:
toml
[[comments]]
author = "{email}"
date = "{today}"
message = "Assigned to {email}"
- •Run
git add .issues/{id}.tomlusing the Bash tool. - •Display the updated issue to the user, confirming the assignment.
Allowed tools
- •
Bash(git *)- for git config and git add - •
Read- for reading the issue file - •
Write- for writing the updated issue file - •
Glob- for verifying the issue file exists