Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions .github/workflows/auto-triage-issues.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions .github/workflows/auto-triage-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ tools:
- "jq *"
- "cat *"
steps:
pre-agent:
- name: Fetch unlabeled issues
run: |
mkdir -p /tmp/gh-aw/agent
gh api "repos/github/gh-aw/issues?state=open&labels=&per_page=30" \
--jq '[.[] | select(.labels | length == 0) | {number: .number, title: .title, body: .body}]' \
> /tmp/gh-aw/agent/unlabeled-issues.json
echo "Unlabeled issues: $(jq length /tmp/gh-aw/agent/unlabeled-issues.json)"
- name: Fetch unlabeled issues
run: |
mkdir -p /tmp/gh-aw/agent
gh api "repos/github/gh-aw/issues?state=open&labels=&per_page=30" \
--jq '[.[] | select(.labels | length == 0) | {number: .number, title: .title, body: .body}]' \
> /tmp/gh-aw/agent/unlabeled-issues.json
echo "Unlabeled issues: $(jq length /tmp/gh-aw/agent/unlabeled-issues.json)"
safe-outputs:
add-labels:
max: 10
Expand Down
8 changes: 4 additions & 4 deletions pkg/stringutil/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,13 @@ func TestSpec_PublicAPI_ExtractDomainFromURL(t *testing.T) {
// | PATTypeOAuth | "oauth" | gho_ |
// | PATTypeUnknown | "unknown" | (other) |
func TestSpec_Constants_PATType(t *testing.T) {
assert.Equal(t, PATType("fine-grained"), PATTypeFineGrained,
assert.Equal(t, PATTypeFineGrained, PATType("fine-grained"),
"PATTypeFineGrained should have documented value 'fine-grained'")
assert.Equal(t, PATType("classic"), PATTypeClassic,
assert.Equal(t, PATTypeClassic, PATType("classic"),
"PATTypeClassic should have documented value 'classic'")
Comment on lines +393 to 396
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions now treat the constant under test as “expected” and the documented literal as “actual”, which makes assertion failure output less intuitive given the message (“…should have documented value…”). If testifylint was complaining about the type-conversion expression, an alternative is to keep the documented value as expected (string literal) and compare it to the constant’s string value, so failures read naturally.

This issue also appears on line 397 of the same file.

See below for a potential fix:

	assert.Equal(t, "fine-grained", string(PATTypeFineGrained),
		"PATTypeFineGrained should have documented value 'fine-grained'")
	assert.Equal(t, "classic", string(PATTypeClassic),
		"PATTypeClassic should have documented value 'classic'")
	assert.Equal(t, "oauth", string(PATTypeOAuth),
		"PATTypeOAuth should have documented value 'oauth'")
	assert.Equal(t, "unknown", string(PATTypeUnknown),

Copilot uses AI. Check for mistakes.
assert.Equal(t, PATType("oauth"), PATTypeOAuth,
assert.Equal(t, PATTypeOAuth, PATType("oauth"),
"PATTypeOAuth should have documented value 'oauth'")
assert.Equal(t, PATType("unknown"), PATTypeUnknown,
assert.Equal(t, PATTypeUnknown, PATType("unknown"),
"PATTypeUnknown should have documented value 'unknown'")
}

Expand Down
Loading