Skip to content

Commit 13f99c7

Browse files
author
CI/CD Tester
committed
feat: Prepare v0.1.1 release with enhanced features and fixes
1 parent 695d702 commit 13f99c7

14 files changed

+2079
-200
lines changed

.env.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
# - Cross-repository operations
33
# - Project boards outside current repository
44
# GITHUB_TOKEN=your_pat_here
5-
# PROJECT_URL=https://github.com/orgs/your-org/projects/1
5+
# PROJECT_URL=https://github.com/orgs/your-org/projects/1
6+
7+
# Optional logging configuration:
8+
# ENABLE_LOGGING=true # Enable/disable logging (default: false)
9+
# LOG_LEVEL=INFO # Log level: DEBUG, INFO, WARN, ERROR (default: INFO)
10+
# LOG_FILE=./logs/gh-issue-manager.log # Log file path (default: ./logs/gh-issue-manager.log)

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.env
22
test-subissues-*
33
.agent.md
4-
.roomodes
4+
logs/
5+
GEMINI.md
6+
SYSTEM.md

.roomodes

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
customModes:
2+
- slug: clean-code-shell
3+
name: Clean Code Developer for Shell Scripts
4+
description: Shell scripting with automated verification
5+
roleDefinition: >-
6+
You are Roo, a shell scripting expert specializing in clean code practices with integrated MCP validation.
7+
Your capabilities include:
8+
- Writing secure, POSIX-compliant scripts with automated verification
9+
- Using MCP tools for documentation, testing, and research
10+
- Implementing comprehensive error handling and logging
11+
whenToUse: >-
12+
Use this mode when creating or modifying shell scripts (.sh files) requiring:
13+
- Security validation
14+
- POSIX compliance verification
15+
- Automated testing via browser automation
16+
- Real-time documentation lookups
17+
groups:
18+
- read
19+
- - edit
20+
- fileRegex: \.sh$
21+
description: Shell script files only
22+
- command
23+
- mcp
24+
customInstructions: >-
25+
MCP TOOL INTEGRATION GUIDE:
26+
27+
1. CONTEXT7 USAGE:
28+
- resolve-library-id: For documentation retrieval
29+
* Example: {"libraryName": "shellcheck"}
30+
- get-library-docs: Retrieve specific documentation
31+
* Use after obtaining library ID
32+
33+
2. PLAYWRIGHT VALIDATION:
34+
- playwright_navigate: Test script HTTP interactions
35+
- playwright_console_logs: Validate CLI output
36+
- start_codegen_session: Create automated test cases
37+
38+
3. TAVILY RESEARCH:
39+
- tavily-search: Security advisories/CVEs
40+
- tavily-extract: Gather specific technical details
41+
42+
IMPLEMENTATION RULES:
43+
1. Always validate with shellcheck before saving
44+
2. Include MCP verification steps in script headers
45+
3. Generate test cases for scripts with external interactions
46+
4. Research platform-specific quirks using Tavily
47+
48+
EXAMPLE WORKFLOW:
49+
1. Create script with proper error handling
50+
2. Verify syntax: execute_command "shellcheck script.sh"
51+
3. Research edge cases: tavily-search {"query": "bash parameter expansion pitfalls"}
52+
4. Create validation tests: playwright_navigate {"url": "http://localhost/test-endpoint"}
53+
- slug: gh-release-manager
54+
name: GitHub Release Manager
55+
description: Automate release workflows
56+
roleDefinition: >-
57+
You are Roo, a GitHub release automation specialist. Your expertise includes:
58+
- Managing semantic versioning and release tagging
59+
- Generating changelogs from closed issues
60+
- Creating and managing GitHub releases
61+
- Integrating with issue tracking systems
62+
- Implementing robust error handling and rollback procedures
63+
- Ensuring POSIX compliance and shell script validation
64+
- Reusing existing logging systems and patterns
65+
- Implementing dry-run capabilities for testing
66+
- Creating automated tests for release workflows
67+
- Validating releases against MCP standards
68+
whenToUse: >-
69+
Use this mode when creating or modifying GitHub release automation scripts,
70+
managing version increments, generating changelogs, or handling release-related
71+
issue management. This mode is specifically designed for release engineering tasks
72+
that require integration with GitHub's API and issue tracking system.
73+
groups:
74+
- read
75+
- - edit
76+
- fileRegex: "\\.(sh|md)$"
77+
description: Shell and Markdown files only
78+
- command
79+
- mcp
80+
customInstructions: >-
81+
Always validate shell scripts with shellcheck before completion.\n
82+
Maintain strict POSIX compliance in all shell scripts.\n
83+
Implement comprehensive error handling with rollback capabilities.\n
84+
Reuse existing logging functions from gh-issue-manager.sh.\n
85+
Include MCP validation headers in all scripts.\n
86+
Implement dry-run mode for all release operations.\n
87+
Create automated tests for all new functionality.\n
88+
Cross-check documentation against implementation.

.rovodev/create-github-release.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Create GitHub Release
2+
3+
Develop a GitHub release manager script (`gh-release-manager.sh`) that integrates with our existing issue management system. The script must:
4+
5+
1. **Version Management**
6+
- Automatically detect the latest release version from GitHub using `gh release view`
7+
- Implement semver parsing with patch version increment as default (e.g., 1.2.3 → 1.2.4)
8+
- Allow optional major/minor version override via flags (`-M` for major, `-m` for minor)
9+
10+
2. **Release Preparation**
11+
- Generate changelog entries from closed issues since last release using `gh issue list`
12+
- Update CHANGELOG.md with new version section and date
13+
- Update version reference in README.md (search/replace pattern)
14+
15+
3. **Release Creation**
16+
- Create draft release with `gh release create` using generated notes
17+
- Tag format: vX.Y.Z
18+
- Pre-release flag support for alpha/beta versions
19+
20+
4. **Issue Management**
21+
- Close issues marked "fixed-in-next-release"
22+
- Link release to related parent/child issues using existing `gh-issue-manager.sh` patterns
23+
24+
5. **Integration Requirements**
25+
- Reuse existing logging system from `gh-issue-manager.sh`
26+
- Maintain POSIX compliance and pass shellcheck validation
27+
- Include MCP validation headers
28+
- Implement dry-run mode for testing
29+
- Add automated tests in `tests/release-tests.sh`
30+
31+
**Example Workflow:**
32+
1. Detect current version (v1.2.3)
33+
2. Calculate next version (v1.2.4)
34+
3. Collect issues closed since v1.2.3
35+
4. Update CHANGELOG.md and README.md with the detected version
36+
5. Create release draft with generated notes
37+
6. Close resolved issues
38+
39+
**Error Handling:**
40+
- Validate GitHub API responses
41+
- Handle merge conflicts in versioned files
42+
- Implement rollback for failed releases
43+
- Check for uncommitted changes before proceeding
44+
45+
**MCP Validation Steps:**
46+
1. Shellcheck compliance
47+
2. POSIX compatibility tests
48+
3. Dry-run validation
49+
4. Automated test execution
50+
5. Documentation cross-check

.rovodev/instructions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
instructions:
2+
- name: create-github-release
3+
description: "Develop GitHub release manager script with version management, changelog generation, and issue linking capabilities."
4+
content_file: create-github-release.md

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
## v0.1.1 (2025-07-29)
4+
- No significant changes.
5+
6+
All notable changes to this project will be documented in this file.
7+
8+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
10+
11+
## [Unreleased]
12+
13+
## [v0.1.1] - 2025-01-28
14+
15+
### Added
16+
- GitHub Release Manager script (`gh-release-manager.sh`)
17+
- Automated version management with semver support
18+
- Changelog generation from closed issues
19+
- Integration with existing issue management system
20+
- Comprehensive test suite for release management
21+
- Enhanced logging system with configurable levels
22+
- Dry-run mode for testing release operations
23+
24+
### Changed
25+
- Enhanced project structure with release management capabilities
26+
- Improved test coverage and error handling
27+
- Updated documentation with release management features
28+
29+
### Fixed
30+
- Syntax errors in test files
31+
- Pre-release tag handling in version management
32+
- Shellcheck warnings and POSIX compliance issues

README.md

Lines changed: 133 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ A robust tool for managing hierarchical issues with GitHub Projects using the of
44

55
## Features
66

7-
-**Parent/child issue relationships** using GitHub's sub-issues API
7+
-**Automates sub-issue creation** - Handles GitHub's complex GraphQL API requirements since sub-issues aren't directly supported in the CLI
8+
-**Simplifies hierarchical workflows** - Single command creates both parent and child issues with proper linking
89
-**Automatic project board linking** with configurable project URLs
10+
-**Optional comprehensive logging** - Track operations, debug issues, and monitor performance
911
-**Environment-based configuration** via `.env` files
1012
-**CLI-based workflow** with comprehensive error handling
1113
-**Input validation** with whitespace and empty argument checking
@@ -56,6 +58,23 @@ A robust tool for managing hierarchical issues with GitHub Projects using the of
5658
"Implement POST /api/auth/login endpoint with validation"
5759
```
5860

61+
### With Logging Enabled
62+
```bash
63+
# Enable logging with INFO level
64+
ENABLE_LOGGING=true LOG_LEVEL=INFO ./gh-issue-manager.sh \
65+
"Implement User Authentication" \
66+
"Add OAuth2 authentication system with JWT tokens" \
67+
"Create Login API Endpoint" \
68+
"Implement POST /api/auth/login endpoint with validation"
69+
70+
# Enable debug logging for troubleshooting
71+
ENABLE_LOGGING=true LOG_LEVEL=DEBUG ./gh-issue-manager.sh \
72+
"Debug Issue Creation" \
73+
"Test issue for debugging purposes" \
74+
"Debug Child Issue" \
75+
"Child issue for testing"
76+
```
77+
5978
## Configuration
6079

6180
### Environment Variables (.env)
@@ -65,6 +84,11 @@ PROJECT_URL=https://github.com/orgs/your-org/projects/1
6584

6685
# Optional: GitHub token (usually not needed if gh CLI is authenticated)
6786
GITHUB_TOKEN=your_personal_access_token
87+
88+
# Optional: Logging configuration
89+
ENABLE_LOGGING=true # Enable/disable logging (default: false)
90+
LOG_LEVEL=INFO # Log level: DEBUG, INFO, WARN, ERROR (default: INFO)
91+
LOG_FILE=./logs/gh-issue-manager.log # Log file path (default: ./logs/gh-issue-manager.log)
6892
```
6993

7094
### Project Board Setup
@@ -73,6 +97,83 @@ GITHUB_TOKEN=your_personal_access_token
7397
3. Copy the project URL to your `.env` file
7498
4. Issues will be automatically added to the project
7599

100+
## Logging
101+
102+
The GitHub Issue Manager includes optional comprehensive logging to help with debugging, monitoring, and audit trails.
103+
104+
### Logging Configuration
105+
106+
Configure logging through environment variables:
107+
108+
```bash
109+
# Enable logging (default: false)
110+
ENABLE_LOGGING=true
111+
112+
# Set log level (default: INFO)
113+
LOG_LEVEL=DEBUG # Most verbose: DEBUG, INFO, WARN, ERROR
114+
LOG_LEVEL=INFO # Standard: INFO, WARN, ERROR
115+
LOG_LEVEL=WARN # Warnings and errors only: WARN, ERROR
116+
LOG_LEVEL=ERROR # Errors only: ERROR
117+
118+
# Set log file path (default: ./logs/gh-issue-manager.log)
119+
LOG_FILE=./logs/gh-issue-manager.log
120+
```
121+
122+
### Log Levels
123+
124+
- **DEBUG** - Detailed debugging information including API calls, timing, and internal operations
125+
- **INFO** - General operational information about successful operations and progress
126+
- **WARN** - Warning messages for non-critical issues (also output to console)
127+
- **ERROR** - Critical failures and errors (also output to console)
128+
129+
### Log Format
130+
131+
```
132+
[TIMESTAMP] [LEVEL] [FUNCTION] MESSAGE
133+
[2025-01-15 10:30:45] [INFO] [create_issues] Creating parent issue: 'Feature Implementation'
134+
[2025-01-15 10:30:46] [DEBUG] [create_issues] GitHub API call: gh issue create --title...
135+
[2025-01-15 10:30:47] [INFO] [create_issues] Parent issue created: #123
136+
[2025-01-15 10:30:48] [INFO] [create_issues] Execution time: 2.145s
137+
```
138+
139+
### Usage Examples
140+
141+
```bash
142+
# Basic logging - INFO level
143+
ENABLE_LOGGING=true ./gh-issue-manager.sh "Title" "Body" "Child" "Body"
144+
145+
# Debug logging for troubleshooting
146+
ENABLE_LOGGING=true LOG_LEVEL=DEBUG ./gh-issue-manager.sh "Title" "Body" "Child" "Body"
147+
148+
# Custom log file location
149+
ENABLE_LOGGING=true LOG_FILE=/var/log/github-issues.log ./gh-issue-manager.sh "Title" "Body" "Child" "Body"
150+
151+
# Set in .env file for persistent configuration
152+
echo "ENABLE_LOGGING=true" >> .env
153+
echo "LOG_LEVEL=INFO" >> .env
154+
./gh-issue-manager.sh "Title" "Body" "Child" "Body"
155+
```
156+
157+
### What Gets Logged
158+
159+
- **Function execution** - Entry, exit, and timing for all major functions
160+
- **GitHub API operations** - Issue creation, sub-issue linking, project assignments
161+
- **Performance metrics** - Execution time for each operation and total runtime
162+
- **Error details** - Comprehensive error information with context
163+
- **Configuration loading** - Environment and .env file processing
164+
- **Validation results** - Input validation and dependency checks
165+
166+
### Log File Management
167+
168+
- **Automatic directory creation** - Log directory created if it doesn't exist
169+
- **Append mode** - New executions append to existing log file
170+
- **Manual rotation** - Rotate logs manually when needed:
171+
172+
```bash
173+
# Rotate log file
174+
mv logs/gh-issue-manager.log logs/gh-issue-manager-$(date +%Y%m%d).log
175+
```
176+
76177
## Error Handling
77178

78179
The script includes comprehensive error handling for common scenarios:
@@ -112,6 +213,23 @@ Run the comprehensive test suite:
112213
- Ensure GitHub CLI is authenticated
113214
- Verify project URLs before use
114215

216+
## Why This Script?
217+
218+
GitHub's CLI (`gh`) doesn't natively support sub-issue creation. Without this script, you would need to manually:
219+
220+
1. Create parent issue
221+
2. Create child issue
222+
3. Use GraphQL API directly to link them
223+
4. Handle API authentication and error checking
224+
5. Manage project board assignments separately
225+
226+
This script automates all these steps in a single command while ensuring:
227+
228+
- ✅ Proper error handling at each stage
229+
- ✅ Input validation and sanitization
230+
- ✅ Environment configuration management
231+
- ✅ Project board integration
232+
115233
## Technical Implementation
116234

117235
Uses GitHub's GraphQL API with `sub_issues` feature flag:
@@ -172,11 +290,24 @@ The script is modularized into testable functions:
172290

173291
### Debug Mode
174292

175-
Run with verbose output:
293+
Multiple debugging approaches available:
294+
176295
```bash
296+
# Method 1: Enable logging with DEBUG level
297+
ENABLE_LOGGING=true LOG_LEVEL=DEBUG ./gh-issue-manager.sh "Parent" "Body" "Child" "Body"
298+
299+
# Method 2: Shell debug mode
177300
set -x # Enable debug mode
178301
./gh-issue-manager.sh "Parent" "Body" "Child" "Body"
179302
set +x # Disable debug mode
303+
304+
# Method 3: Combined logging and shell debug
305+
set -x
306+
ENABLE_LOGGING=true LOG_LEVEL=DEBUG ./gh-issue-manager.sh "Parent" "Body" "Child" "Body"
307+
set +x
308+
309+
# Check log file for detailed execution trace
310+
cat logs/gh-issue-manager.log
180311
```
181312

182313
## Contributing
@@ -195,5 +326,3 @@ set +x # Disable debug mode
195326
- Maintain >80% function coverage
196327
- Add both unit and integration tests
197328
- Include error scenario testing
198-
199-
![GitHub Sub-Issue Relationship](https://docs.github.com/assets/cb-138303/images/help/issues/sub-issues.png)

0 commit comments

Comments
 (0)