This issue is to add a new matchLabel rule condition to the rules engine.
Overview
Currently, gong supports matching reviewers based on name patterns using the matchName condition. This issue proposes adding a new matchLabel condition that would allow rules to be applied based on the PR title matching specific patterns.
Implementation Details
- Update the
Rule struct in internal/rules/rules.go to include a new MatchLabel field
- Modify the rule matching logic in
ApplyRules function to check PR titles against patterns
- Add support for parsing the new condition from the config file
- Pass the PR title from the GitHub API response to the rules engine
Acceptance Criteria
- Users can define rules that match based on PR label
- Rules can combine both
matchName and matchTitle and matchLabel conditions
- The new condition is properly documented in the configuration guide
- Unit tests are added to verify the functionality
- Update examples in the configuration documentation
References
The existing matchName implementation can be used as a reference.
This issue is to add a new
matchLabelrule condition to the rules engine.Overview
Currently, gong supports matching reviewers based on name patterns using the
matchNamecondition. This issue proposes adding a newmatchLabelcondition that would allow rules to be applied based on the PR title matching specific patterns.Implementation Details
Rulestruct ininternal/rules/rules.goto include a newMatchLabelfieldApplyRulesfunction to check PR titles against patternsAcceptance Criteria
matchNameandmatchTitleandmatchLabelconditionsReferences
The existing
matchNameimplementation can be used as a reference.