RFR: 1407: GitLabMergeRequest#filesUrl returns wrong result
Guoxiong Li
gli at openjdk.java.net
Sat Apr 23 21:26:39 UTC 2022
Hi all,
The SKARA-744 [1][2] solved a problem about the link to the changes for just one commit. But it didn't solve the issue completely in GitLab. Please see the current issue [3] for more information.
This patch revises `GitLabMergeRequest#filesUrl` to return a `version url` if it exists which can represent the changed files **from the first commit to the provided commit HASH**. A corresponding test is added and a previous test is polished.
You can use the following config to run the new test `GitLabRestApiTest#testFilesUrl`:
gitlab.user=<your username in https://gitlab.com>
gitlab.pat=<your token in https://gitlab.com>
gitlab.uri=https://gitlab.com
gitlab.repository=35596381
gitlab.merge.request.id=1
gitlab.version.hash=60f39eb698e73cc2660f870667a54e7a53ee7018
gitlab.version.url=https://gitlab.com/lgxbslgx/test/-/merge_requests/1/diffs?diff_id=379601911
gitlab.nonversion.hash=c9b5a70790b13c3e7e182c9b83015f9f10d53df7
gitlab.nonversion.url=https://gitlab.com/lgxbslgx/test/-/merge_requests/1/diffs?commit_id=c9b5a70790b13c3e7e182c9b83015f9f10d53df7
Thanks for taking the time to review.
Best Regards,
-- Guoxiong
[1] https://bugs.openjdk.java.net/browse/SKARA-744
[2] https://git.openjdk.java.net/skara/commit/f16663b7
[3] https://bugs.openjdk.java.net/browse/SKARA-1407
-------------
Commit messages:
- 1407: GitLabMergeRequest#filesUrl returns wrong result
Changes: https://git.openjdk.java.net/skara/pull/1304/files
Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1304&range=00
Issue: https://bugs.openjdk.java.net/browse/SKARA-1407
Stats: 76 lines in 3 files changed: 71 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/skara/pull/1304.diff
Fetch: git fetch https://git.openjdk.java.net/skara pull/1304/head:pull/1304
PR: https://git.openjdk.java.net/skara/pull/1304
More information about the skara-dev
mailing list