-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[gitlab] Accept '#' sign in branches / context URLs #5362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -528,6 +528,66 @@ class TestGitlabContextParser { | |
}) | ||
} | ||
|
||
@test public async testTreeContextBranchWithHashSign01() { | ||
const result = await this.parser.handle({}, this.user, 'https://gitlab.com/gp-test-group/gp-test-project/-/tree/feature/%23123-issue'); | ||
expect(result).to.deep.include({ | ||
"ref": "feature/#123-issue", | ||
"refType": "branch", | ||
"path": "", | ||
"revision": "8b389233c0a3a55a5cd75f89d2c96761420bf2c8", | ||
"isFile": false, | ||
"repository": { | ||
"host": "gitlab.com", | ||
"owner": "gp-test-group", | ||
"name": "gp-test-project", | ||
"cloneUrl": "https://gitlab.com/gp-test-group/gp-test-project.git", | ||
"defaultBranch": "master", | ||
"private": false | ||
}, | ||
"title": "gp-test-group/gp-test-project - feature/#123-issue" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Shall we move this group under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I definitely would love it if we would create proper repos for all these (and the GH) tests under the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💯 x 💯 |
||
}) | ||
} | ||
|
||
@test public async testTreeContextBranchWithHashSign02() { | ||
const result = await this.parser.handle({}, this.user, 'https://gitlab.com/gp-test-group/gp-test-project/-/tree/issue-%23123'); | ||
expect(result).to.deep.include({ | ||
"ref": "issue-#123", | ||
"refType": "branch", | ||
"path": "", | ||
"revision": "8b389233c0a3a55a5cd75f89d2c96761420bf2c8", | ||
"isFile": false, | ||
"repository": { | ||
"host": "gitlab.com", | ||
"owner": "gp-test-group", | ||
"name": "gp-test-project", | ||
"cloneUrl": "https://gitlab.com/gp-test-group/gp-test-project.git", | ||
"defaultBranch": "master", | ||
"private": false | ||
}, | ||
"title": "gp-test-group/gp-test-project - issue-#123" | ||
}) | ||
} | ||
|
||
@test public async testTreeContextBranchWithAndSign() { | ||
const result = await this.parser.handle({}, this.user, 'https://gitlab.com/gp-test-group/gp-test-project/-/tree/another&branch'); | ||
expect(result).to.deep.include({ | ||
"ref": "another&branch", | ||
"refType": "branch", | ||
"path": "", | ||
"revision": "8b389233c0a3a55a5cd75f89d2c96761420bf2c8", | ||
"isFile": false, | ||
"repository": { | ||
"host": "gitlab.com", | ||
"owner": "gp-test-group", | ||
"name": "gp-test-project", | ||
"cloneUrl": "https://gitlab.com/gp-test-group/gp-test-project.git", | ||
"defaultBranch": "master", | ||
"private": false | ||
}, | ||
"title": "gp-test-group/gp-test-project - another&branch" | ||
}) | ||
} | ||
|
||
@test public async testEmptyProject() { | ||
const result = await this.parser.handle({}, this.user, 'https://gitlab.com/gp-test-group/gp-test-empty-project'); | ||
expect(result).to.deep.include({ | ||
|
Uh oh!
There was an error while loading. Please reload this page.