Support new issue creation by email without subaddressing
What does this MR do?
We could not create issues and MRs via email because the addresses we generate had the subaddressing character +
embedded in them. In addition we also used the /
character in the path names to allow us to identify the project. However these characters are invalid in some email systems.
We now standardize on removing these characters and using actions and project ids.
Here are some examples. Note that we're using the subaddressing version, that has incoming+
as a prefix. The catchall version would be prefixed with incoming-
.
Reply email | |
---|---|
Old | incoming+1234567890abcdef1234567890abcdef@incoming.gitlab.com |
New: | incoming+1234567890abcdef1234567890abcdef@incoming.gitlab.com |
No change necessary - the single token uniquely identifies the object being replied to.
Unsubscribe email | |
---|---|
Old | incoming+1234567890abcdef1234567890abcdef+unsubscribe@incoming.gitlab.com |
New: | incoming+1234567890abcdef1234567890abcdef-unsubscribe@incoming.gitlab.com |
The final +
is removed. The unsubscribe
action is already part of the email.
New issue by email | |
---|---|
Old | incoming+gitlab-org/gitlab-ce+#{author_token}@incoming.gitlab.com |
New: | incoming+gitlab-org-gitlab-ce-#{project_id}-#{author_token}-issue@incoming.gitlab.com |
Old | incoming+victor---wu--/more-dashes--/dashed--project--+#{author_token}@incoming.gitlab.com |
New: | incoming+victor---wu---more-dashes---dashed--project---#{project_id}-#{author_token}-issue@incoming.gitlab.com |
The path is converted using dasherize
, replacing the /
with -
. The project id is added, which is used to identify the actual project being targeted. And the action issue
is added to the end.
New MR by email | |
---|---|
Old | incoming+gitlab-org/gitlab-ce+merge-request+#{author_token}@incoming.gitlab.com |
New: | incoming+gitlab-org-gitlab-ce-#{project_id}-#{author_token}-merge-request@incoming.gitlab.com |
The path is converted, project id added, and the merge-request
action moved to the end.
New Service Desk issue by email | |
---|---|
Old | incoming+gitlab-org/gitlab-ce@incoming.gitlab.com |
New: | incoming+gitlab-org-gitlab-ce-#{project_id}-issue-@incoming.gitlab.com |
Used in EE Only: The path is converted, project id added, and the action -issue-
is added to the end (trailing -
indicates it's for the service desk)
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Closes #29951 (closed)