-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[GitLabCoverage] subgroup bug #8401
Merged
chris48s
merged 16 commits into
badges:master
from
PaulaBarszcz:gitlab-coverage-subgroup-bug
Sep 28, 2022
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b5fce8f
1st part of gitlab coverage service modification is done (no redirect…
PaulaBarszcz 33587e2
redirector-trouble for gitlab coverage
PaulaBarszcz 33c8f6f
Merge branch 'master' into gitlab-coverage-subgroup-bug
PaulaBarszcz 2104d01
Merge branch 'master' into gitlab-coverage-subgroup-bug
PaulaBarszcz 6a3e413
modify the new url to pipeline-coverage
PaulaBarszcz d1bf07c
modify service tests - no redirection tests yet
PaulaBarszcz 7d02f93
Merge branch 'master' into gitlab-coverage-subgroup-bug
PaulaBarszcz e365121
why is the redirect-test failing
PaulaBarszcz 06834a4
Merge branch 'master' into gitlab-coverage-subgroup-bug
PaulaBarszcz f095d76
remove the not working redirection test
PaulaBarszcz 84041fa
Merge branch 'master' into gitlab-coverage-subgroup-bug
PaulaBarszcz 73748fd
add gitlab-coverage-redirect.service and gitlab-coverage-redirect.ser…
PaulaBarszcz 17aeff8
remove redundant redirector from gitlab-pipeline-coverage.service
PaulaBarszcz dbd2fdb
rename GitlabCoverage class to GitlabPipelineCoverage
PaulaBarszcz 047fa91
modify gitlab-pipeline-coverage.tester.js
PaulaBarszcz 78a5e9a
remove an unnecessary example
PaulaBarszcz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { redirector } from '../index.js' | ||
|
||
export default redirector({ | ||
category: 'coverage', | ||
route: { | ||
base: 'gitlab/coverage', | ||
pattern: ':user/:repo/:branch', | ||
}, | ||
transformPath: ({ user, repo }) => | ||
`/gitlab/pipeline-coverage/${user}/${repo}`, | ||
transformQueryParams: ({ branch }) => ({ branch }), | ||
dateAdded: new Date('2022-09-25'), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { createServiceTester } from '../tester.js' | ||
export const t = await createServiceTester() | ||
|
||
t.create('Coverage redirect (with branch)') | ||
.get('/gitlab-org/gitlab-runner/master.json') | ||
.expectRedirect( | ||
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master' | ||
) | ||
|
||
t.create('Coverage redirect (with branch and job_name)') | ||
.get('/gitlab-org/gitlab-runner/master.json?job_name=test coverage report') | ||
.expectRedirect( | ||
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master&job_name=test%20coverage%20report' | ||
) | ||
|
||
t.create('Coverage redirect (with branch and gitlab_url)') | ||
.get( | ||
'/gitlab-org/gitlab-runner/master.json?gitlab_url=https://gitlab.gnome.org' | ||
) | ||
.expectRedirect( | ||
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master&gitlab_url=https%3a%2f%2fgitlab.gnome.org' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. One more minor thing. We can drop this example. For all the other GitLab badges (pipeline status, issues, merge requests, releases, etc) they work for repos in nested subgroups but we don't explicitly provide an example in the frontend. In general we try and keep the number of example of different variations in the examples to a minimum if possible. Cheers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, example removed ;)