-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
✨ Assign issues to a designated assignee #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general looks good.
def assign_new(self): | ||
assignee = self._select_assignee() | ||
self._assign_user(assignee) | ||
self._add_label(self.config.unconfirmed_label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the example use here of changing labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new issue gets unconfirmed
label. After confirming contributor removes unconfirmed
label.
There is a TODO in process_issue
doc string suggesting adding a reaction on a magic comment like "can confirm" that should change unconfirmed
label to confirmed
.
src/logic/issues.py
Outdated
@dataclass(kw_only=True) | ||
class LabelAssign: | ||
# for example "Selected Assignee: @samuelcolvin" | ||
ASSIGNEE_REGEX: typing.ClassVar[re.Pattern] = re.compile(r'selected[ -]assignee:\s*@([\w\-]+)$', flags=re.I) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASSIGNEE_REGEX: typing.ClassVar[re.Pattern] = re.compile(r'selected[ -]assignee:\s*@([\w\-]+)$', flags=re.I) | |
ASSIGNEE_REGEX: typing.ClassVar[re.Pattern] = re.compile(r'selected[ -]assignee:\s*@([\w\-]+)$', flags=re.I) |
I don't think this should necessarily have to end the line or all text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the issue may be edited by the author.
As your suggestion is empty I assume you are suggesting removing trailing $
from the regex. I would rather enable multiline and add leading ^
. This will require the text to be on a dedicated line but will allow it to be in any place of the issue body.
BTW, this is just a copy of the reviewer regex from the sibling pr
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree requiring a new line is good, ideally we'd reuse the regex in both places.
Co-authored-by: Samuel Colvin <[email protected]>
Co-authored-by: Samuel Colvin <[email protected]>
b80a7ee
to
5ca7522
Compare
please review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't ready everything exactly but overall looking good.
src/logic/issues.py
Outdated
@dataclass(kw_only=True) | ||
class LabelAssign: | ||
# for example "Selected Assignee: @samuelcolvin" | ||
ASSIGNEE_REGEX: typing.ClassVar[re.Pattern] = re.compile(r'selected[ -]assignee:\s*@([\w\-]+)$', flags=re.I) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree requiring a new line is good, ideally we'd reuse the regex in both places.
please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if you're happy please merge and check it all seems to be working correctly.
No description provided.