issuer 0.1.0 â 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/issuer.gemspec +5 -9
- data/lib/issuer/cli.rb +5 -5
- data/lib/issuer/issue.rb +26 -13
- data/lib/issuer/sites/base.rb +2 -1
- data/lib/issuer/sites/github.rb +29 -4
- metadata +2 -36
- data/.rspec +0 -3
- data/.vale/config/vocabularies/issuer/accept.txt +0 -63
- data/.vale/config/vocabularies/issuer/reject.txt +0 -21
- data/.vale.ini +0 -42
- data/Dockerfile +0 -43
- data/Rakefile +0 -70
- data/bin/console +0 -0
- data/bin/issuer +0 -13
- data/bin/setup +0 -0
- data/examples/README.adoc +0 -56
- data/scripts/build.sh +0 -40
- data/scripts/lint-docs.sh +0 -64
- data/scripts/manage-runs.rb +0 -175
- data/scripts/pre-commit-template.sh +0 -54
- data/scripts/publish.sh +0 -92
- data/scripts/setup-vale.sh +0 -59
- data/specs/tests/README.adoc +0 -451
- data/specs/tests/check-github-connectivity.sh +0 -130
- data/specs/tests/cleanup-github-tests.sh +0 -374
- data/specs/tests/github-api/01-auth-connection.yml +0 -21
- data/specs/tests/github-api/02-basic-issues.yml +0 -90
- data/specs/tests/github-api/03-milestone-tests.yml +0 -58
- data/specs/tests/github-api/04-label-tests.yml +0 -98
- data/specs/tests/github-api/05-assignment-tests.yml +0 -55
- data/specs/tests/github-api/06-automation-tests.yml +0 -102
- data/specs/tests/github-api/07-error-tests.yml +0 -29
- data/specs/tests/github-api/08-complex-tests.yml +0 -197
- data/specs/tests/github-api/config.yml.example +0 -17
- data/specs/tests/rspec/cli_spec.rb +0 -127
- data/specs/tests/rspec/issue_spec.rb +0 -184
- data/specs/tests/rspec/issuer_spec.rb +0 -5
- data/specs/tests/rspec/ops_spec.rb +0 -124
- data/specs/tests/rspec/spec_helper.rb +0 -54
- data/specs/tests/run-github-api-tests.sh +0 -424
@@ -1,374 +0,0 @@
|
|
1
|
-
#!/usr/bin/env zsh
|
2
|
-
# GitHub Test Cleanup Script
|
3
|
-
# Helps clean up test issues, milestones, and labels created during testing
|
4
|
-
|
5
|
-
set -e
|
6
|
-
|
7
|
-
# Colors for output
|
8
|
-
RED='\033[0;31m'
|
9
|
-
GREEN='\033[0;32m'
|
10
|
-
YELLOW='\033[1;33m'
|
11
|
-
BLUE='\033[0;34m'
|
12
|
-
NC='\033[0m' # No Color
|
13
|
-
|
14
|
-
# Configuration
|
15
|
-
TEST_REPO=""
|
16
|
-
DRY_RUN=false
|
17
|
-
INTERACTIVE=true
|
18
|
-
|
19
|
-
print_header() {
|
20
|
-
echo
|
21
|
-
echo -e "${BLUE}===========================================${NC}"
|
22
|
-
echo -e "${BLUE} đ§š GitHub Test Cleanup Script ${NC}"
|
23
|
-
echo -e "${BLUE}===========================================${NC}"
|
24
|
-
echo
|
25
|
-
}
|
26
|
-
|
27
|
-
print_success() {
|
28
|
-
echo -e "${GREEN}â
$1${NC}"
|
29
|
-
}
|
30
|
-
|
31
|
-
print_error() {
|
32
|
-
echo -e "${RED}â $1${NC}"
|
33
|
-
}
|
34
|
-
|
35
|
-
print_warning() {
|
36
|
-
echo -e "${YELLOW}â ī¸ $1${NC}"
|
37
|
-
}
|
38
|
-
|
39
|
-
print_info() {
|
40
|
-
echo -e "${BLUE}âšī¸ $1${NC}"
|
41
|
-
}
|
42
|
-
|
43
|
-
show_help() {
|
44
|
-
echo "GitHub Test Cleanup Script"
|
45
|
-
echo
|
46
|
-
echo "Usage: $0 [options] REPOSITORY"
|
47
|
-
echo
|
48
|
-
echo "Arguments:"
|
49
|
-
echo " REPOSITORY GitHub repository (user/repo or org/repo)"
|
50
|
-
echo
|
51
|
-
echo "Options:"
|
52
|
-
echo " --help, -h Show this help message"
|
53
|
-
echo " --dry-run, -n Show what would be done without making changes"
|
54
|
-
echo " --non-interactive Run without prompts"
|
55
|
-
echo " --issues-only Only clean up issues, not milestones/labels"
|
56
|
-
echo " --milestones-only Only clean up milestones"
|
57
|
-
echo " --labels-only Only clean up labels"
|
58
|
-
echo
|
59
|
-
echo "Environment Variables:"
|
60
|
-
echo " GITHUB_TOKEN GitHub personal access token (required)"
|
61
|
-
echo
|
62
|
-
echo "Examples:"
|
63
|
-
echo " $0 myuser/test-repo # Interactive cleanup"
|
64
|
-
echo " $0 --dry-run myuser/test-repo # Show what would be cleaned"
|
65
|
-
echo " $0 --issues-only myuser/test-repo # Only close test issues"
|
66
|
-
echo
|
67
|
-
}
|
68
|
-
|
69
|
-
cleanup_issues() {
|
70
|
-
local repo="$1"
|
71
|
-
|
72
|
-
print_info "Searching for test issues in $repo..."
|
73
|
-
|
74
|
-
if [[ "$DRY_RUN" == "true" ]]; then
|
75
|
-
print_warning "DRY RUN: Would search for and close issues with titles containing '[TEST]'"
|
76
|
-
echo "Command that would be run:"
|
77
|
-
echo " gh issue list --repo $repo --search '[TEST]' --state open"
|
78
|
-
echo " gh issue close --repo $repo [issue_numbers]"
|
79
|
-
else
|
80
|
-
# Get open test issues
|
81
|
-
local issue_numbers
|
82
|
-
issue_numbers=$(gh issue list --repo "$repo" --search '[TEST]' --state open --json number --jq '.[].number' 2>/dev/null || echo "")
|
83
|
-
|
84
|
-
if [[ -z "$issue_numbers" ]]; then
|
85
|
-
print_info "No open test issues found to close"
|
86
|
-
else
|
87
|
-
print_info "Found open test issues to close:"
|
88
|
-
echo "$issue_numbers" | while read number; do
|
89
|
-
[[ -n "$number" ]] && echo " - Issue #$number"
|
90
|
-
done
|
91
|
-
|
92
|
-
if [[ "$INTERACTIVE" == "true" ]]; then
|
93
|
-
echo -n "Proceed with closing test issues? [y/N] "
|
94
|
-
read -r response
|
95
|
-
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
96
|
-
print_info "Issue cleanup skipped by user"
|
97
|
-
return
|
98
|
-
fi
|
99
|
-
fi
|
100
|
-
|
101
|
-
print_info "Closing test issues..."
|
102
|
-
echo "$issue_numbers" | while read number; do
|
103
|
-
if [[ -n "$number" ]]; then
|
104
|
-
echo " Closing issue #$number"
|
105
|
-
if gh issue close --repo "$repo" "$number" >/dev/null 2>&1; then
|
106
|
-
print_success "Closed issue #$number"
|
107
|
-
else
|
108
|
-
print_error "Failed to close issue #$number"
|
109
|
-
fi
|
110
|
-
fi
|
111
|
-
done
|
112
|
-
fi
|
113
|
-
fi
|
114
|
-
}
|
115
|
-
|
116
|
-
cleanup_milestones() {
|
117
|
-
local repo="$1"
|
118
|
-
|
119
|
-
print_info "Searching for test milestones in $repo..."
|
120
|
-
|
121
|
-
if [[ "$DRY_RUN" == "true" ]]; then
|
122
|
-
print_warning "DRY RUN: Would search for and delete milestones containing 'test'"
|
123
|
-
echo "Test milestone patterns to look for:"
|
124
|
-
echo " - test-milestone-*"
|
125
|
-
echo " - *-test-*"
|
126
|
-
echo " - auto-test-*"
|
127
|
-
echo " - complex-test-*"
|
128
|
-
else
|
129
|
-
# Get test milestones using GitHub API
|
130
|
-
local milestones
|
131
|
-
milestones=$(gh api "repos/$repo/milestones" 2>/dev/null | jq -r '.[] | select(.title | test("test|auto-test|complex-test|alias-test|individual-test")) | "\(.number) \(.title)"' 2>/dev/null || echo "")
|
132
|
-
|
133
|
-
if [[ -z "$milestones" ]]; then
|
134
|
-
print_info "No test milestones found to delete"
|
135
|
-
else
|
136
|
-
print_info "Found test milestones to delete:"
|
137
|
-
echo "$milestones" | while read number title; do
|
138
|
-
[[ -n "$number" ]] && echo " - $title (#$number)"
|
139
|
-
done
|
140
|
-
|
141
|
-
if [[ "$INTERACTIVE" == "true" ]]; then
|
142
|
-
echo -n "Proceed with deleting test milestones? [y/N] "
|
143
|
-
read -r response
|
144
|
-
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
145
|
-
print_info "Milestone cleanup skipped by user"
|
146
|
-
return
|
147
|
-
fi
|
148
|
-
fi
|
149
|
-
|
150
|
-
print_info "Deleting test milestones..."
|
151
|
-
echo "$milestones" | while read number title; do
|
152
|
-
if [[ -n "$number" && -n "$title" ]]; then
|
153
|
-
echo " Deleting milestone: $title (#$number)"
|
154
|
-
if gh api -X DELETE "repos/$repo/milestones/$number" >/dev/null 2>&1; then
|
155
|
-
print_success "Deleted milestone: $title"
|
156
|
-
else
|
157
|
-
print_error "Failed to delete milestone: $title"
|
158
|
-
fi
|
159
|
-
fi
|
160
|
-
done
|
161
|
-
fi
|
162
|
-
fi
|
163
|
-
}
|
164
|
-
|
165
|
-
cleanup_labels() {
|
166
|
-
local repo="$1"
|
167
|
-
|
168
|
-
print_info "Searching for test labels in $repo..."
|
169
|
-
|
170
|
-
if [[ "$DRY_RUN" == "true" ]]; then
|
171
|
-
print_warning "DRY RUN: Would search for and delete labels containing 'test'"
|
172
|
-
echo "Test label patterns to look for:"
|
173
|
-
echo " - test-*"
|
174
|
-
echo " - *-test"
|
175
|
-
echo " - auto-test-*"
|
176
|
-
echo " - comprehensive-test"
|
177
|
-
else
|
178
|
-
# Get test labels using gh CLI
|
179
|
-
local labels
|
180
|
-
labels=$(gh label list --repo "$repo" 2>/dev/null | grep -E "(test|auto-test|brand-new|individual|alias|comprehensive)" | cut -f1 2>/dev/null || echo "")
|
181
|
-
|
182
|
-
if [[ -z "$labels" ]]; then
|
183
|
-
print_info "No test labels found to delete"
|
184
|
-
else
|
185
|
-
print_info "Found test labels to delete:"
|
186
|
-
echo "$labels" | while read label; do
|
187
|
-
[[ -n "$label" ]] && echo " - $label"
|
188
|
-
done
|
189
|
-
|
190
|
-
if [[ "$INTERACTIVE" == "true" ]]; then
|
191
|
-
echo -n "Proceed with deleting test labels? [y/N] "
|
192
|
-
read -r response
|
193
|
-
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
194
|
-
print_info "Label cleanup skipped by user"
|
195
|
-
return
|
196
|
-
fi
|
197
|
-
fi
|
198
|
-
|
199
|
-
print_info "Deleting test labels..."
|
200
|
-
echo "$labels" | while read label; do
|
201
|
-
if [[ -n "$label" ]]; then
|
202
|
-
echo " Deleting label: $label"
|
203
|
-
if gh label delete --repo "$repo" "$label" --yes >/dev/null 2>&1; then
|
204
|
-
print_success "Deleted label: $label"
|
205
|
-
else
|
206
|
-
print_error "Failed to delete label: $label"
|
207
|
-
fi
|
208
|
-
fi
|
209
|
-
done
|
210
|
-
fi
|
211
|
-
fi
|
212
|
-
}
|
213
|
-
|
214
|
-
generate_cleanup_commands() {
|
215
|
-
local repo="$1"
|
216
|
-
local script_file="cleanup_commands_$(date +%Y%m%d_%H%M%S).sh"
|
217
|
-
|
218
|
-
print_info "Generating cleanup commands script: $script_file"
|
219
|
-
|
220
|
-
cat > "$script_file" << EOF
|
221
|
-
#!/usr/bin/env zsh
|
222
|
-
# Generated cleanup commands for GitHub test artifacts
|
223
|
-
# Repository: $repo
|
224
|
-
# Generated: $(date)
|
225
|
-
|
226
|
-
set -e
|
227
|
-
|
228
|
-
echo "đ§š Cleaning up test artifacts for $repo"
|
229
|
-
echo
|
230
|
-
|
231
|
-
# Close all test issues
|
232
|
-
echo "đ Closing test issues..."
|
233
|
-
gh issue list --repo $repo --search '[TEST]' --state open --json number,title | \\
|
234
|
-
jq -r '.[] | "gh issue close --repo $repo \\(.number) # \\(.title)"' | \\
|
235
|
-
while read -r cmd; do
|
236
|
-
echo "Running: \$cmd"
|
237
|
-
eval "\$cmd"
|
238
|
-
done
|
239
|
-
|
240
|
-
echo
|
241
|
-
|
242
|
-
# List milestones to review (manual deletion required)
|
243
|
-
echo "đ¯ Test milestones to review:"
|
244
|
-
gh api "repos/$repo/milestones" | jq -r '.[] | select(.title | test("test|auto-test|complex-test")) | "Milestone: \\(.title) (\\(.open_issues) open issues)"'
|
245
|
-
|
246
|
-
echo
|
247
|
-
echo "â ī¸ Please manually delete test milestones from the repository web interface"
|
248
|
-
|
249
|
-
echo
|
250
|
-
|
251
|
-
# List labels to review (manual deletion required)
|
252
|
-
echo "đˇī¸ Test labels to review:"
|
253
|
-
gh api "repos/$repo/labels" | jq -r '.[] | select(.name | test("test|auto-test|comprehensive-test")) | "Label: \\(.name) (\\(.description // "no description"))"'
|
254
|
-
|
255
|
-
echo
|
256
|
-
echo "â ī¸ Please manually delete test labels from the repository web interface"
|
257
|
-
|
258
|
-
echo
|
259
|
-
echo "â
Test issue cleanup completed!"
|
260
|
-
echo "đ Repository: https://github.com/$repo"
|
261
|
-
EOF
|
262
|
-
|
263
|
-
chmod +x "$script_file"
|
264
|
-
print_success "Cleanup script generated: $script_file"
|
265
|
-
print_info "Run this script to execute the cleanup commands"
|
266
|
-
}
|
267
|
-
|
268
|
-
main() {
|
269
|
-
local cleanup_issues=true
|
270
|
-
local cleanup_milestones=true
|
271
|
-
local cleanup_labels=true
|
272
|
-
|
273
|
-
# Parse command line arguments
|
274
|
-
while [[ $# -gt 0 ]]; do
|
275
|
-
case $1 in
|
276
|
-
--help|-h)
|
277
|
-
show_help
|
278
|
-
exit 0
|
279
|
-
;;
|
280
|
-
--dry-run|-n)
|
281
|
-
DRY_RUN=true
|
282
|
-
shift
|
283
|
-
;;
|
284
|
-
--non-interactive)
|
285
|
-
INTERACTIVE=false
|
286
|
-
shift
|
287
|
-
;;
|
288
|
-
--issues-only)
|
289
|
-
cleanup_milestones=false
|
290
|
-
cleanup_labels=false
|
291
|
-
shift
|
292
|
-
;;
|
293
|
-
--milestones-only)
|
294
|
-
cleanup_issues=false
|
295
|
-
cleanup_labels=false
|
296
|
-
shift
|
297
|
-
;;
|
298
|
-
--labels-only)
|
299
|
-
cleanup_issues=false
|
300
|
-
cleanup_milestones=false
|
301
|
-
shift
|
302
|
-
;;
|
303
|
-
-*)
|
304
|
-
print_error "Unknown option: $1"
|
305
|
-
show_help
|
306
|
-
exit 1
|
307
|
-
;;
|
308
|
-
*)
|
309
|
-
if [[ -z "$TEST_REPO" ]]; then
|
310
|
-
TEST_REPO="$1"
|
311
|
-
else
|
312
|
-
print_error "Multiple repositories specified"
|
313
|
-
exit 1
|
314
|
-
fi
|
315
|
-
shift
|
316
|
-
;;
|
317
|
-
esac
|
318
|
-
done
|
319
|
-
|
320
|
-
if [[ -z "$TEST_REPO" ]]; then
|
321
|
-
print_error "Repository not specified"
|
322
|
-
show_help
|
323
|
-
exit 1
|
324
|
-
fi
|
325
|
-
|
326
|
-
# Validate repository format
|
327
|
-
if [[ ! "$TEST_REPO" =~ ^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$ ]]; then
|
328
|
-
print_error "Invalid repository format. Use: user/repo or org/repo"
|
329
|
-
exit 1
|
330
|
-
fi
|
331
|
-
|
332
|
-
print_header
|
333
|
-
|
334
|
-
print_info "Repository: $TEST_REPO"
|
335
|
-
print_info "Dry run: $DRY_RUN"
|
336
|
-
print_info "Interactive: $INTERACTIVE"
|
337
|
-
|
338
|
-
if [[ "$DRY_RUN" == "false" && "$INTERACTIVE" == "true" ]]; then
|
339
|
-
echo
|
340
|
-
echo -n "Proceed with cleanup? [y/N] "
|
341
|
-
read -r response
|
342
|
-
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
343
|
-
print_info "Cleanup cancelled by user"
|
344
|
-
exit 0
|
345
|
-
fi
|
346
|
-
fi
|
347
|
-
|
348
|
-
echo
|
349
|
-
|
350
|
-
# Run cleanup operations
|
351
|
-
if [[ "$cleanup_issues" == "true" ]]; then
|
352
|
-
cleanup_issues "$TEST_REPO"
|
353
|
-
echo
|
354
|
-
fi
|
355
|
-
|
356
|
-
if [[ "$cleanup_milestones" == "true" ]]; then
|
357
|
-
cleanup_milestones "$TEST_REPO"
|
358
|
-
echo
|
359
|
-
fi
|
360
|
-
|
361
|
-
if [[ "$cleanup_labels" == "true" ]]; then
|
362
|
-
cleanup_labels "$TEST_REPO"
|
363
|
-
echo
|
364
|
-
fi
|
365
|
-
|
366
|
-
# Generate cleanup script if not in dry-run mode
|
367
|
-
if [[ "$DRY_RUN" == "false" ]]; then
|
368
|
-
generate_cleanup_commands "$TEST_REPO"
|
369
|
-
fi
|
370
|
-
|
371
|
-
print_success "Cleanup process completed!"
|
372
|
-
}
|
373
|
-
|
374
|
-
main "$@"
|
@@ -1,21 +0,0 @@
|
|
1
|
-
$meta:
|
2
|
-
proj: DocOps/issuer-test # Test repository
|
3
|
-
|
4
|
-
issues:
|
5
|
-
- summ: "[TEST] Authentication verification"
|
6
|
-
body: |
|
7
|
-
# Authentication Test Issue
|
8
|
-
|
9
|
-
This issue verifies that the issuer CLI can successfully:
|
10
|
-
|
11
|
-
- â
Detect GitHub authentication token
|
12
|
-
- â
Connect to GitHub API
|
13
|
-
- â
Access the target repository
|
14
|
-
- â
Create issues via API
|
15
|
-
|
16
|
-
**Test Details:**
|
17
|
-
- Created via: issuer CLI
|
18
|
-
- Test type: Authentication & basic connectivity
|
19
|
-
- Expected outcome: This issue should be created successfully
|
20
|
-
|
21
|
-
If you can see this issue, the basic authentication and API connection is working! đ
|
@@ -1,90 +0,0 @@
|
|
1
|
-
$meta:
|
2
|
-
proj: DocOps/issuer-test # Test repository
|
3
|
-
|
4
|
-
issues:
|
5
|
-
- summ: "[TEST] Simple issue creation"
|
6
|
-
body: |
|
7
|
-
# Basic Issue Test
|
8
|
-
|
9
|
-
This tests the most fundamental functionality: creating a simple issue with a title and body.
|
10
|
-
|
11
|
-
**What this tests:**
|
12
|
-
- Basic issue creation
|
13
|
-
- Title and body handling
|
14
|
-
- No additional complexity
|
15
|
-
|
16
|
-
- summ: "[TEST] Markdown formatting support"
|
17
|
-
body: |
|
18
|
-
# Markdown Formatting Test
|
19
|
-
|
20
|
-
This issue tests **markdown formatting** support in issue bodies.
|
21
|
-
|
22
|
-
## Features tested:
|
23
|
-
|
24
|
-
### Text formatting:
|
25
|
-
- **Bold text**
|
26
|
-
- *Italic text*
|
27
|
-
- `inline code`
|
28
|
-
- ~~strikethrough~~
|
29
|
-
|
30
|
-
### Lists:
|
31
|
-
1. Numbered list item 1
|
32
|
-
2. Numbered list item 2
|
33
|
-
|
34
|
-
- Bullet point 1
|
35
|
-
- Bullet point 2
|
36
|
-
- Nested bullet
|
37
|
-
- Another nested bullet
|
38
|
-
|
39
|
-
### Code blocks:
|
40
|
-
```javascript
|
41
|
-
function testFunction() {
|
42
|
-
console.log("Hello, GitHub Issues!");
|
43
|
-
return "markdown test";
|
44
|
-
}
|
45
|
-
```
|
46
|
-
|
47
|
-
```yaml
|
48
|
-
# YAML example
|
49
|
-
test:
|
50
|
-
markdown: true
|
51
|
-
formatting: working
|
52
|
-
```
|
53
|
-
|
54
|
-
### Links and references:
|
55
|
-
- [GitHub Documentation](https://docs.github.com)
|
56
|
-
- [issuer CLI Repository](https://github.com/DocOps/issuer)
|
57
|
-
|
58
|
-
### Tables:
|
59
|
-
| Feature | Status | Notes |
|
60
|
-
|---------|--------|-------|
|
61
|
-
| Bold text | â
| Working |
|
62
|
-
| Code blocks | â
| Working |
|
63
|
-
| Tables | â
| Working |
|
64
|
-
|
65
|
-
> **Note**: This is a blockquote to test quotation formatting.
|
66
|
-
|
67
|
-
If all the above formatting appears correctly, markdown support is working! đ¨
|
68
|
-
|
69
|
-
- "[TEST] String-only issue (minimal syntax)"
|
70
|
-
|
71
|
-
- summ: "[TEST] Issue with special characters"
|
72
|
-
body: |
|
73
|
-
# Special Characters Test đ
|
74
|
-
|
75
|
-
Testing various special characters and emoji support:
|
76
|
-
|
77
|
-
**Unicode characters:** ÎąÎ˛ÎŗÎ´Îĩ ÃąÃĄÃŠÃÃŗÃē 䏿 æĨæŦčĒ Ø§ŲØšØąØ¨ŲØŠ
|
78
|
-
|
79
|
-
**Symbols:** @#$%^&*()_+-=[]{}|;':",./<>?
|
80
|
-
|
81
|
-
**Emojis:** đ đ â
â đ§ đ đĄ đ¯ đ đ
|
82
|
-
|
83
|
-
**Code with special chars:**
|
84
|
-
```bash
|
85
|
-
echo "Testing special chars: !@#$%^&*()"
|
86
|
-
grep -r "pattern" /path/to/files
|
87
|
-
sed 's/old/new/g' file.txt
|
88
|
-
```
|
89
|
-
|
90
|
-
This tests the robustness of issue creation with various character encodings.
|
@@ -1,58 +0,0 @@
|
|
1
|
-
$meta:
|
2
|
-
proj: DocOps/issuer-test # Test repository
|
3
|
-
defaults:
|
4
|
-
vrsn: test-milestone-v1.0
|
5
|
-
|
6
|
-
issues:
|
7
|
-
- summ: "[TEST] Issue with new milestone creation"
|
8
|
-
body: |
|
9
|
-
# Milestone Creation Test
|
10
|
-
|
11
|
-
This issue tests automatic milestone creation functionality.
|
12
|
-
|
13
|
-
**What this tests:**
|
14
|
-
- Creating a new milestone when it doesn't exist
|
15
|
-
- Associating an issue with a newly created milestone
|
16
|
-
- The `--auto-versions` or `--auto-metadata` flag functionality
|
17
|
-
|
18
|
-
**Expected behavior:**
|
19
|
-
1. A new milestone called "test-milestone-v1.0" should be created
|
20
|
-
2. This issue should be associated with that milestone
|
21
|
-
3. The milestone should appear in the repository's Milestones section
|
22
|
-
|
23
|
-
**Test commands:**
|
24
|
-
```bash
|
25
|
-
# With manual confirmation
|
26
|
-
issuer 03-milestone-tests.yml
|
27
|
-
|
28
|
-
# With automatic creation (no prompts)
|
29
|
-
issuer 03-milestone-tests.yml --auto-versions
|
30
|
-
issuer 03-milestone-tests.yml --auto-metadata
|
31
|
-
```
|
32
|
-
|
33
|
-
- summ: "[TEST] Issue with existing milestone"
|
34
|
-
body: |
|
35
|
-
# Existing Milestone Test
|
36
|
-
|
37
|
-
This issue should use the same milestone as the previous issue, testing that:
|
38
|
-
|
39
|
-
- The CLI can find and reuse existing milestones
|
40
|
-
- Multiple issues can be assigned to the same milestone
|
41
|
-
- No duplicate milestones are created
|
42
|
-
|
43
|
-
This issue should be associated with the "test-milestone-v1.0" milestone.
|
44
|
-
vrsn: test-milestone-v1.0
|
45
|
-
|
46
|
-
- summ: "[TEST] Issue with different milestone"
|
47
|
-
body: |
|
48
|
-
# Multiple Milestone Test
|
49
|
-
|
50
|
-
This issue tests creating and using a second milestone.
|
51
|
-
|
52
|
-
**Expected behavior:**
|
53
|
-
- A new milestone "test-milestone-v2.0" should be created
|
54
|
-
- This issue should be associated with the new milestone
|
55
|
-
- Both milestones should exist in the repository
|
56
|
-
|
57
|
-
This tests the ability to handle multiple milestones in a single operation.
|
58
|
-
vrsn: test-milestone-v2.0
|
@@ -1,98 +0,0 @@
|
|
1
|
-
$meta:
|
2
|
-
proj: DocOps/issuer-test # Test repository
|
3
|
-
defaults:
|
4
|
-
tags: [test-default-label, +auto-applied-label]
|
5
|
-
|
6
|
-
issues:
|
7
|
-
- summ: "[TEST] Issue with new label creation"
|
8
|
-
body: |
|
9
|
-
# Label Creation Test
|
10
|
-
|
11
|
-
This issue tests automatic label creation functionality.
|
12
|
-
|
13
|
-
**What this tests:**
|
14
|
-
- Creating new labels when they don't exist
|
15
|
-
- The `--auto-tags` or `--auto-metadata` flag functionality
|
16
|
-
- Default label application from `$meta.defaults.tags`
|
17
|
-
|
18
|
-
**Expected labels on this issue:**
|
19
|
-
- `test-new-label-1` (new, should be created)
|
20
|
-
- `test-new-label-2` (new, should be created)
|
21
|
-
- `test-default-label` (from defaults)
|
22
|
-
- `auto-applied-label` (from defaults with + prefix)
|
23
|
-
|
24
|
-
**Test commands:**
|
25
|
-
```bash
|
26
|
-
# With manual confirmation
|
27
|
-
issuer 04-label-tests.yml
|
28
|
-
|
29
|
-
# With automatic creation (no prompts)
|
30
|
-
issuer 04-label-tests.yml --auto-tags
|
31
|
-
issuer 04-label-tests.yml --auto-metadata
|
32
|
-
```
|
33
|
-
tags: [test-new-label-1, test-new-label-2]
|
34
|
-
|
35
|
-
- summ: "[TEST] Issue with mixed existing/new labels"
|
36
|
-
body: |
|
37
|
-
# Mixed Label Test
|
38
|
-
|
39
|
-
This issue tests using a combination of:
|
40
|
-
- Existing labels that are already in the repository
|
41
|
-
- New labels that need to be created
|
42
|
-
- Default labels from metadata
|
43
|
-
|
44
|
-
**Expected labels on this issue:**
|
45
|
-
- `bug` (should already exist in most repositories)
|
46
|
-
- `enhancement` (should already exist in most repositories)
|
47
|
-
- `test-mixed-new-label` (new, should be created)
|
48
|
-
- `test-default-label` (from defaults)
|
49
|
-
- `auto-applied-label` (from defaults with + prefix)
|
50
|
-
|
51
|
-
This tests the CLI's ability to handle mixed scenarios gracefully.
|
52
|
-
tags: [bug, enhancement, test-mixed-new-label]
|
53
|
-
|
54
|
-
- summ: "[TEST] Issue with label append vs. default behavior"
|
55
|
-
body: |
|
56
|
-
# Label Logic Test
|
57
|
-
|
58
|
-
This issue has its own explicit tags, so it should:
|
59
|
-
|
60
|
-
**Get these labels:**
|
61
|
-
- `test-explicit-label-1` (explicitly specified)
|
62
|
-
- `test-explicit-label-2` (explicitly specified)
|
63
|
-
- `auto-applied-label` (from defaults with + prefix - always appended)
|
64
|
-
|
65
|
-
**NOT get these labels:**
|
66
|
-
- `test-default-label` (from defaults without + prefix - only for issues without explicit tags)
|
67
|
-
|
68
|
-
This tests the append (+) vs. default tag logic.
|
69
|
-
tags: [test-explicit-label-1, test-explicit-label-2]
|
70
|
-
|
71
|
-
- summ: "[TEST] Issue with no explicit tags (should get defaults)"
|
72
|
-
body: |
|
73
|
-
# Default Label Test
|
74
|
-
|
75
|
-
This issue has no explicit tags, so it should get all default labels:
|
76
|
-
|
77
|
-
**Expected labels:**
|
78
|
-
- `test-default-label` (from defaults without + prefix)
|
79
|
-
- `auto-applied-label` (from defaults with + prefix)
|
80
|
-
|
81
|
-
This tests that default labels are properly applied to issues without explicit tags.
|
82
|
-
|
83
|
-
- summ: "[TEST] Label color and description test"
|
84
|
-
body: |
|
85
|
-
# Label Customization Test
|
86
|
-
|
87
|
-
This issue tests whether custom label colors and descriptions are supported.
|
88
|
-
|
89
|
-
**Note:** The current implementation may create labels with default colors.
|
90
|
-
Future versions might support custom colors and descriptions in the IMYML format.
|
91
|
-
|
92
|
-
**Expected labels:**
|
93
|
-
- `test-color-label` (new label)
|
94
|
-
- `test-description-label` (new label)
|
95
|
-
- Default labels from metadata
|
96
|
-
|
97
|
-
Check the repository's Labels section to see what colors were assigned to the new labels.
|
98
|
-
tags: [test-color-label, test-description-label]
|
@@ -1,55 +0,0 @@
|
|
1
|
-
$meta:
|
2
|
-
proj: DocOps/issuer-test # Test repository # Update this with your test repository
|
3
|
-
|
4
|
-
issues:
|
5
|
-
- summ: "[TEST] Self-assigned issue"
|
6
|
-
body: |
|
7
|
-
# Assignment Test
|
8
|
-
|
9
|
-
This issue tests the user assignment functionality.
|
10
|
-
|
11
|
-
**What this tests:**
|
12
|
-
- Assigning an issue to a specific user
|
13
|
-
- User validation (the user must have access to the repository)
|
14
|
-
- Assignment display in the GitHub interface
|
15
|
-
|
16
|
-
**Expected behavior:**
|
17
|
-
- This issue should be assigned to the repository owner/collaborator
|
18
|
-
- The assignee should appear in the GitHub Issues interface
|
19
|
-
- The assignee should receive notifications (if configured)
|
20
|
-
|
21
|
-
**Important:** Make sure to update the `user` field below with a valid GitHub username that has access to the test repository.
|
22
|
-
|
23
|
-
**Test commands:**
|
24
|
-
```bash
|
25
|
-
issuer 05-assignment-tests.yml --dry # Check assignment before posting
|
26
|
-
issuer 05-assignment-tests.yml # Create with assignment
|
27
|
-
```
|
28
|
-
user: briandominick # GitHub username # Update this with a valid GitHub username
|
29
|
-
|
30
|
-
- summ: "[TEST] Issue with default assignee"
|
31
|
-
body: |
|
32
|
-
# Default Assignee Test
|
33
|
-
|
34
|
-
This issue tests using a default assignee specified in metadata defaults.
|
35
|
-
|
36
|
-
**Expected behavior:**
|
37
|
-
- Should be assigned to the same user as specified in defaults
|
38
|
-
- Tests the inheritance of user assignment from metadata
|
39
|
-
|
40
|
-
Note: This test requires setting a default user in the metadata section.
|
41
|
-
# This issue will use the default user from $meta.defaults if specified
|
42
|
-
|
43
|
-
- summ: "[TEST] Unassigned issue"
|
44
|
-
body: |
|
45
|
-
# Unassigned Issue Test
|
46
|
-
|
47
|
-
This issue should remain unassigned to test that:
|
48
|
-
|
49
|
-
- Issues without explicit or default assignees work correctly
|
50
|
-
- The assignment field is properly omitted from the API call
|
51
|
-
- No errors occur when no assignee is specified
|
52
|
-
|
53
|
-
**Expected behavior:**
|
54
|
-
- This issue should appear with no assignee in GitHub
|
55
|
-
- No assignment-related errors should occur during creation
|