Commit f09394cf authored by Arturo Herrero's avatar Arturo Herrero

Remove Jira Issue username

We are not going to use the username because Jira API doesn't provide
`name` in the case of Jira Cloud.

This partially reverts 63082f24.
parent d0f48240
...@@ -79,7 +79,6 @@ module Integrations ...@@ -79,7 +79,6 @@ module Integrations
def jira_user(user) def jira_user(user)
{ {
name: user['displayName'], name: user['displayName'],
username: user['name'],
web_url: jira_web_url(user), web_url: jira_web_url(user),
avatar_url: user['avatarUrls']['48x48'] avatar_url: user['avatarUrls']['48x48']
} }
......
...@@ -87,13 +87,11 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do ...@@ -87,13 +87,11 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
], ],
author: hash_including( author: hash_including(
name: 'reporter', name: 'reporter',
username: 'reporter@reporter.com',
avatar_url: 'http://reporter.avatar' avatar_url: 'http://reporter.avatar'
), ),
assignees: [ assignees: [
hash_including( hash_including(
name: 'assignee', name: 'assignee',
username: 'assignee@assignee.com',
avatar_url: 'http://assignee.avatar' avatar_url: 'http://assignee.avatar'
) )
], ],
...@@ -103,11 +101,10 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do ...@@ -103,11 +101,10 @@ RSpec.describe Integrations::Jira::IssueDetailEntity do
comments: [ comments: [
hash_including( hash_including(
id: '10022', id: '10022',
author: hash_including({ author: hash_including(
name: 'comment_author', name: 'comment_author',
username: 'comment@author.com',
avatar_url: 'http://comment_author.avatar' avatar_url: 'http://comment_author.avatar'
}), ),
body_html: "<p dir=\"auto\">Comment</p>", body_html: "<p dir=\"auto\">Comment</p>",
created_at: '2020-06-25T15:50:00.000+0000'.to_datetime.utc, created_at: '2020-06-25T15:50:00.000+0000'.to_datetime.utc,
updated_at: '2020-06-25T15:51:00.000+0000'.to_datetime.utc updated_at: '2020-06-25T15:51:00.000+0000'.to_datetime.utc
......
...@@ -61,13 +61,11 @@ RSpec.describe Integrations::Jira::IssueEntity do ...@@ -61,13 +61,11 @@ RSpec.describe Integrations::Jira::IssueEntity do
], ],
author: hash_including( author: hash_including(
name: 'reporter', name: 'reporter',
username: 'reporter@reporter.com',
avatar_url: 'http://reporter.avatar' avatar_url: 'http://reporter.avatar'
), ),
assignees: [ assignees: [
hash_including( hash_including(
name: 'assignee', name: 'assignee',
username: 'assignee@assignee.com',
avatar_url: 'http://assignee.avatar' avatar_url: 'http://assignee.avatar'
) )
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment