Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'tag: assigned' filter #109

Merged
merged 2 commits into from
May 15, 2020
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
1 change: 1 addition & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Triage Party has an automatic tagging mechanism that adds annotations which can
* `recv-q`: the original author commented with a question more recently than a member of the project has commented (may be waiting on an answer from a project member)
* `member-last`: a member of the organization was the last commenter
* `author-last`: the original author was the last commenter
* `assigned`: the issue or PR has been assigned to someone
* `closed`: the issue or PR has been closed
* `similar`: the issue or PR appears to be similar to another
* `new-commits`: the PR has new commits since the last member response
2 changes: 1 addition & 1 deletion pkg/hubbub/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func preFetchMatch(i GitHubItem, labels []*github.Label, fs []Filter) bool {
}

// This state can be performed without downloading comments
if f.TagRegex() != nil && f.TagRegex().String() == "assigned" {
if f.TagRegex() != nil && f.TagRegex().String() == "^assigned$" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TagRegex object is instantiated with regex(...) method. This wraps tag string with ^ and $. So, the rule should compare with "^assigned$"

// If assigned and no assignee, fail
if !f.TagNegate() && i.GetAssignee() == nil {
return false
Expand Down