Background
gem-contribute scan currently filters open issues by the single canonical label "good first issue" (see Scan::DEFAULT_LABEL). Many repos use slight variants of this label and are silently dropped from the ranked list.
Concrete example: rainbow's issue #112 is labeled "Good first issue :tada:" (note the suffix and capitalization). It does not match "good first issue" exactly and never appears in scan output, even though it's a perfect contribution target.
ADR-0005 deliberately rejects label normalization (don't rewrite "easy" → "beginner-friendly") — but it explicitly carves out preferred_labels as the user-controlled escape valve:
preferred_labels matches case-insensitively against the raw label text. Hyphens and spaces are treated as equivalent.
We have not implemented preferred_labels yet. This issue is that work.
Desired behavior
- Add
preferred_labels to Config with a sensible default. Suggested default:
preferred_labels:
- good first issue
- good-first-issue
- help wanted
gem-contribute config set preferred_labels "label1,label2" (comma-separated; YAML list under the hood).
Scan runs one API request per preferred label, dedupes by issue number, and ranks the union.
- Matching is case-insensitive;
- and are interchangeable. The label "Good first issue :tada:" matches "good first issue" if (and only if) we widen the comparison to a substring or normalize the suffix away — discuss in the PR which semantics you choose.
Acceptance criteria
Out of scope
- Synonym tables ("easy" ≈ "beginner") — that's the normalization ADR-0005 rejects.
- A full label-discovery UI in the TUI — Stage 3 territory.
Files likely to touch
lib/gem_contribute/config.rb — add the key, default
lib/gem_contribute/cli/scan.rb — replace DEFAULT_LABEL with the configured list
lib/gem_contribute/cli/issues.rb — same
spec/gem_contribute/cli/scan_spec.rb, spec/gem_contribute/cli/issues_spec.rb, spec/gem_contribute/config_spec.rb
How to pick this up
gem-contribute fix gem-contribute/<this-issue-number>
This is a workshop-friendly first contribution.
Background
gem-contribute scancurrently filters open issues by the single canonical label"good first issue"(seeScan::DEFAULT_LABEL). Many repos use slight variants of this label and are silently dropped from the ranked list.Concrete example: rainbow's issue #112 is labeled
"Good first issue :tada:"(note the suffix and capitalization). It does not match"good first issue"exactly and never appears in scan output, even though it's a perfect contribution target.ADR-0005 deliberately rejects label normalization (don't rewrite
"easy"→"beginner-friendly") — but it explicitly carves outpreferred_labelsas the user-controlled escape valve:We have not implemented
preferred_labelsyet. This issue is that work.Desired behavior
preferred_labelstoConfigwith a sensible default. Suggested default:gem-contribute config set preferred_labels "label1,label2"(comma-separated; YAML list under the hood).Scanruns one API request per preferred label, dedupes by issue number, and ranks the union.-andare interchangeable. The label"Good first issue :tada:"matches"good first issue"if (and only if) we widen the comparison to a substring or normalize the suffix away — discuss in the PR which semantics you choose.Acceptance criteria
preferred_labelsis read from~/.config/gem-contribute/config.yml.Scanqueries each label and merges results, deduping by(owner, repo, number).GitHubAdapter#issuescontinues to work for the multi-label case (already keyed on sorted label list).rainbowsurfaces issue #112 (or whatever the current set is) by default, without further configuration.gem-contribute issues <gem>(which uses the same label list).Out of scope
Files likely to touch
lib/gem_contribute/config.rb— add the key, defaultlib/gem_contribute/cli/scan.rb— replaceDEFAULT_LABELwith the configured listlib/gem_contribute/cli/issues.rb— samespec/gem_contribute/cli/scan_spec.rb,spec/gem_contribute/cli/issues_spec.rb,spec/gem_contribute/config_spec.rbHow to pick this up
This is a workshop-friendly first contribution.