Skip to content

Add matchLabel condition #31

@Djiit

Description

@Djiit

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

  1. Update the Rule struct in internal/rules/rules.go to include a new MatchLabel field
  2. Modify the rule matching logic in ApplyRules function to check PR titles against patterns
  3. Add support for parsing the new condition from the config file
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededrulesAbout rules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions