Skip to content
Snippets Groups Projects
Commit fc7a624c authored by paz's avatar paz
Browse files

Tag the issue upon emails that probably require a response

Follow-up emails now lead to the issue being tagged with `needs-anwer`,
unless they are closing the issue, or are signed by a subscriber.
The tag is removed if the issue is closed, or if the email resends
itself.
parent ccf36b75
No related tags found
1 merge request!3Draft: Tag emails that probably require an answer; only close if from subscriber
Pipeline #77418 failed
......@@ -47,11 +47,20 @@ module SchleuderGitlabTicketing
if !tc && bc
labels.delete('inprocess')
labels.delete('needs-answer')
updates[:state_event] = 'close'
elsif !tc && !bc
labels << 'inprocess' if updates[:assignee_id]
if from_subscriber(mail)
if has_x_resend(mail)
labels.delete('needs-answer')
end
else
labels << 'needs-answer'
end
elsif tc && !bc
labels << 'inprocess'
labels << 'needs-answer'
updates[:state_event] = 'reopen'
end
if labels.empty? && (updates[:state_event] == 'close')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment