✨ feat: enhance commit message skill with issue reference suggestions (related to #2)
Some checks failed
Go CI/CD Pipeline / Build and Test (push) Successful in 4m26s
Docker Build and Publish / Version Bump (push) Successful in 10m6s
Go CI/CD Pipeline / Lint and Format (push) Successful in 10m33s
Go CI/CD Pipeline / Version Management (push) Successful in 25s
Main Branch CI/CD (Optimized) / Build and Test (push) Failing after 4m2s
Main Branch CI/CD (Optimized) / Lint and Format (push) Successful in 4m41s
Main Branch CI/CD (Optimized) / Version Management and Docker Build (push) Has been skipped
Docker Build and Publish / Build and Push Docker Image (push) Failing after 5m1s
Some checks failed
Go CI/CD Pipeline / Build and Test (push) Successful in 4m26s
Docker Build and Publish / Version Bump (push) Successful in 10m6s
Go CI/CD Pipeline / Lint and Format (push) Successful in 10m33s
Go CI/CD Pipeline / Version Management (push) Successful in 25s
Main Branch CI/CD (Optimized) / Build and Test (push) Failing after 4m2s
Main Branch CI/CD (Optimized) / Lint and Format (push) Successful in 4m41s
Main Branch CI/CD (Optimized) / Version Management and Docker Build (push) Has been skipped
Docker Build and Publish / Build and Push Docker Image (push) Failing after 5m1s
This commit is contained in:
@@ -183,6 +183,104 @@ Get the current status of a pull request.
|
||||
- `repo`: Repository name
|
||||
- `pr_number`: PR number
|
||||
|
||||
### List Issues
|
||||
|
||||
```bash
|
||||
skill gitea-client list-issues <owner> <repo> [state]
|
||||
```
|
||||
|
||||
List issues for a repository.
|
||||
|
||||
**Arguments:**
|
||||
- `owner`: Repository owner
|
||||
- `repo`: Repository name
|
||||
- `state`: Issue state (open, closed, all) - default: open
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# List open issues
|
||||
gitea-client list-issues arcodange DanceLessonsCoach
|
||||
|
||||
# List closed issues
|
||||
gitea-client list-issues arcodange DanceLessonsCoach closed
|
||||
|
||||
# List all issues
|
||||
gitea-client list-issues arcodange DanceLessonsCoach all
|
||||
```
|
||||
|
||||
### Create Issue
|
||||
|
||||
```bash
|
||||
skill gitea-client create-issue <owner> <repo> <title> <description>
|
||||
```
|
||||
|
||||
Create a new issue in the repository.
|
||||
|
||||
**Arguments:**
|
||||
- `owner`: Repository owner
|
||||
- `repo`: Repository name
|
||||
- `title`: Issue title
|
||||
- `description`: Issue description (use quotes)
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# Create a simple issue
|
||||
gitea-client create-issue arcodange DanceLessonsCoach "Bug in CI workflow" "The CI workflow fails on job 350"
|
||||
|
||||
# Create detailed issue with multi-line description
|
||||
gitea-client create-issue arcodange DanceLessonsCoach "Optimize main branch workflow" "Current workflow has separate version bump and Docker build steps. Need to optimize by:
|
||||
|
||||
1. Share artifacts between CI jobs for faster execution
|
||||
2. Combine version management and Docker build in single workflow
|
||||
3. Use proper job dependencies and artifact caching
|
||||
4. Reduce total CI time by avoiding redundant builds"
|
||||
```
|
||||
|
||||
### Show Issue Details
|
||||
|
||||
```bash
|
||||
skill gitea-client show-issue <owner> <repo> <issue_number>
|
||||
```
|
||||
|
||||
Get detailed information about a specific issue.
|
||||
|
||||
**Arguments:**
|
||||
- `owner`: Repository owner
|
||||
- `repo`: Repository name
|
||||
- `issue_number`: Issue number
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# Show issue details
|
||||
gitea-client show-issue arcodange DanceLessonsCoach 42
|
||||
|
||||
# Get issue and extract title
|
||||
gitea-client show-issue arcodange DanceLessonsCoach 42 | jq '.title'
|
||||
```
|
||||
|
||||
### Comment on Issue
|
||||
|
||||
```bash
|
||||
skill gitea-client comment-issue <owner> <repo> <issue_number> <comment>
|
||||
```
|
||||
|
||||
Add a comment to an existing issue.
|
||||
|
||||
**Arguments:**
|
||||
- `owner`: Repository owner
|
||||
- `repo`: Repository name
|
||||
- `issue_number`: Issue number
|
||||
- `comment`: Comment text (use quotes)
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# Add simple comment
|
||||
gitea-client comment-issue arcodange DanceLessonsCoach 42 "Working on this now"
|
||||
|
||||
# Add detailed update
|
||||
gitea-client comment-issue arcodange DanceLessonsCoach 42 "Created optimized workflow in .gitea/workflows/main-branch-optimized.yaml. Ready for testing."
|
||||
```
|
||||
|
||||
## Workflows
|
||||
|
||||
### Monitor CI/CD Job
|
||||
@@ -217,6 +315,30 @@ skill gitea-client job-logs owner repo job_id > workflow_logs.txt
|
||||
skill gitea-client comment-pr owner repo pr_number "Job failed: analysis results"
|
||||
```
|
||||
|
||||
### Issue Management Workflow
|
||||
|
||||
```bash
|
||||
# 1. List open issues
|
||||
gitea-client list-issues arcodange DanceLessonsCoach
|
||||
|
||||
# 2. Create new issue for workflow optimization
|
||||
gitea-client create-issue arcodange DanceLessonsCoach "Optimize main branch workflow" "Current workflow has separate version bump and Docker build steps. Need to optimize by:
|
||||
|
||||
1. Share artifacts between CI jobs for faster execution
|
||||
2. Combine version management and Docker build in single workflow
|
||||
3. Use proper job dependencies and artifact caching
|
||||
4. Reduce total CI time by avoiding redundant builds"
|
||||
|
||||
# 3. Show issue details
|
||||
gitea-client show-issue arcodange DanceLessonsCoach 42
|
||||
|
||||
# 4. Add progress comment
|
||||
gitea-client comment-issue arcodange DanceLessonsCoach 42 "Created optimized workflow in .gitea/workflows/main-branch-optimized.yaml. Ready for testing."
|
||||
|
||||
# 5. Close issue when resolved
|
||||
gitea-client comment-issue arcodange DanceLessonsCoach 42 "✅ RESOLVED: Optimized workflow implemented and tested successfully."
|
||||
```
|
||||
|
||||
### Complete CI Debugging Workflow
|
||||
|
||||
```bash
|
||||
|
||||
@@ -234,6 +234,10 @@ main() {
|
||||
wait-job) cmd_wait_job "$@" ;;
|
||||
comment-pr) cmd_comment_pr "$@" ;;
|
||||
pr-status) cmd_pr_status "$@" ;;
|
||||
list-issues) cmd_list_issues "$@" ;;
|
||||
create-issue) cmd_create_issue "$@" ;;
|
||||
show-issue) cmd_show_issue "$@" ;;
|
||||
comment-issue) cmd_comment_issue "$@" ;;
|
||||
*)
|
||||
echo "Usage: $0 <command> [args...]" >&2
|
||||
echo "" >&2
|
||||
@@ -246,9 +250,84 @@ main() {
|
||||
echo " wait-job <owner> <repo> <job_id> [timeout]" >&2
|
||||
echo " comment-pr <owner> <repo> <pr_number> <comment>" >&2
|
||||
echo " pr-status <owner> <repo> <pr_number>" >&2
|
||||
echo " list-issues <owner> <repo> [state]" >&2
|
||||
echo " create-issue <owner> <repo> <title> <description>" >&2
|
||||
echo " show-issue <owner> <repo> <issue_number>" >&2
|
||||
echo " comment-issue <owner> <repo> <issue_number> <comment>" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# List issues
|
||||
cmd_list_issues() {
|
||||
local owner="$1"
|
||||
local repo="$2"
|
||||
local state="${3:-open}"
|
||||
|
||||
if [[ -z "$owner" || -z "$repo" ]]; then
|
||||
echo "Usage: $0 list-issues <owner> <repo> [state]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local endpoint="/repos/$owner/$repo/issues?state=$state"
|
||||
api_request "GET" "$endpoint"
|
||||
}
|
||||
|
||||
# Create a new issue
|
||||
cmd_create_issue() {
|
||||
local owner="$1"
|
||||
local repo="$2"
|
||||
local title="$3"
|
||||
local description="$4"
|
||||
|
||||
if [[ -z "$owner" || -z "$repo" || -z "$title" || -z "$description" ]]; then
|
||||
echo "Usage: $0 create-issue <owner> <repo> <title> <description>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local endpoint="/repos/$owner/$repo/issues"
|
||||
local data=$(jq -n --arg title "$title" --arg body "$description" '{
|
||||
title: $title,
|
||||
body: $body
|
||||
}')
|
||||
|
||||
api_request "POST" "$endpoint" "$data"
|
||||
}
|
||||
|
||||
# Show issue details
|
||||
cmd_show_issue() {
|
||||
local owner="$1"
|
||||
local repo="$2"
|
||||
local issue_number="$3"
|
||||
|
||||
if [[ -z "$owner" || -z "$repo" || -z "$issue_number" ]]; then
|
||||
echo "Usage: $0 show-issue <owner> <repo> <issue_number>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local endpoint="/repos/$owner/$repo/issues/$issue_number"
|
||||
api_request "GET" "$endpoint"
|
||||
}
|
||||
|
||||
# Comment on an issue
|
||||
cmd_comment_issue() {
|
||||
local owner="$1"
|
||||
local repo="$2"
|
||||
local issue_number="$3"
|
||||
local comment="$4"
|
||||
|
||||
if [[ -z "$owner" || -z "$repo" || -z "$issue_number" || -z "$comment" ]]; then
|
||||
echo "Usage: $0 comment-issue <owner> <repo> <issue_number> <comment>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local endpoint="/repos/$owner/$repo/issues/$issue_number/comments"
|
||||
local data=$(jq -n --arg body "$comment" '{
|
||||
body: $body
|
||||
}')
|
||||
|
||||
api_request "POST" "$endpoint" "$data"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user