summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-14 12:08:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-14 12:08:26 +0000
commit6bc327a3491069240bd73cc83e17b3078c4148b0 (patch)
tree82c3548afeb527590247d4c6b862a1023c10e304
parente0e9501a69a2d34f51b72c5f8ede345de69de22f (diff)
downloadgitlab-ce-6bc327a3491069240bd73cc83e17b3078c4148b0.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/lib/utils/url_utility.js9
-rw-r--r--lib/api/helpers/integrations_helpers.rb2
-rw-r--r--spec/frontend/lib/utils/url_utility_spec.js12
3 files changed, 1 insertions, 22 deletions
diff --git a/app/assets/javascripts/lib/utils/url_utility.js b/app/assets/javascripts/lib/utils/url_utility.js
index 7bf34dbaa2e..6c1495b8468 100644
--- a/app/assets/javascripts/lib/utils/url_utility.js
+++ b/app/assets/javascripts/lib/utils/url_utility.js
@@ -321,15 +321,6 @@ export function getBaseURL() {
}
/**
- * Takes a URL and returns content from the start until the final '/'
- *
- * @param {String} url - full url, including protocol and host
- */
-export function stripFinalUrlSegment(url) {
- return new URL('.', url).href;
-}
-
-/**
* Returns true if url is an absolute URL
*
* @param {String} url
diff --git a/lib/api/helpers/integrations_helpers.rb b/lib/api/helpers/integrations_helpers.rb
index 072431a24ab..701418931f3 100644
--- a/lib/api/helpers/integrations_helpers.rb
+++ b/lib/api/helpers/integrations_helpers.rb
@@ -592,7 +592,7 @@ module API
desc: 'The base URL to the Jira instance API. Web URL value will be used if not set. E.g., https://jira-api.example.com'
},
{
- required: true,
+ required: false,
name: :jira_auth_type,
type: Integer,
desc: 'The authorization type for Jira'
diff --git a/spec/frontend/lib/utils/url_utility_spec.js b/spec/frontend/lib/utils/url_utility_spec.js
index 72556e6bbe2..0799bc87c8c 100644
--- a/spec/frontend/lib/utils/url_utility_spec.js
+++ b/spec/frontend/lib/utils/url_utility_spec.js
@@ -788,18 +788,6 @@ describe('URL utility', () => {
});
});
- describe('stripFinalUrlSegment', () => {
- it.each`
- path | expected
- ${'http://fake.domain/twitter/typeahead-js/-/tags/v0.11.0'} | ${'http://fake.domain/twitter/typeahead-js/-/tags/'}
- ${'http://fake.domain/bar/cool/-/nested/content'} | ${'http://fake.domain/bar/cool/-/nested/'}
- ${'http://fake.domain/bar/cool?q="search"'} | ${'http://fake.domain/bar/'}
- ${'http://fake.domain/bar/cool#link-to-something'} | ${'http://fake.domain/bar/'}
- `('stripFinalUrlSegment $path => $expected', ({ path, expected }) => {
- expect(urlUtils.stripFinalUrlSegment(path)).toBe(expected);
- });
- });
-
describe('escapeFileUrl', () => {
it('encodes URL excluding the slashes', () => {
expect(urlUtils.escapeFileUrl('/foo-bar/file.md')).toBe('/foo-bar/file.md');