Skip to content

Make new jira_auth_type Jira API argument optional

Luke Duncalfe requested to merge 364850-bugfix-jira-api into master

What does this MR do and why?

This MR makes the new jira_auth_type Jira API argument optional.

It was added in !118054 (merged) as required, but this is an accidental breaking change.

The property does not need to be required, because the database can default the property to 0.

!118054 (comment 1387807404)

How to set up and validate locally

We can make curl requests locally to create/update (It's a PUT, so the same endpoint does both) a Jira integration through the API.

Replace:

  • <TOKEN> with an API token for your development environment.
  • <PROJECT_PATH> with your project full path, but with / encoded as %2F, for example: gitlab-org%2Fgitlab.

On this branch, we can make a PUT to the Jira integration API endpoint without needing to include the jira_auth_token param:

curl -v --location --request PUT 'http://gdk.test:3000/api/v4/projects/<PROJECT_PATH>/services/jira/?private_token=<TOKEN>&url=https%3A%2F%2Fmy-test.atlassian.net&password=foo'

Response will include:

HTTP/1.1 200 OK

On master, this will result in:

HTTP/1.1 400 Bad Request
...
{"error":"jira_auth_type is missing"}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #364850 (closed)

Edited by Luke Duncalfe

Merge request reports

Loading