-
Improvement
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.375.4
When using REST APIs to check "affectedpaths", we get relative path from repositiry and NOT the complete path.
Sample command:
https://jenkins.<company>.com/job/<jobname>/<buildnumber>/api/json?pretty=true&tree=result,changeSets[items[comment,affectedPaths,affectedfiles,msg,url,commitId,url,timestamp,authorEmail]]
This shows:
"affectedPaths" : [
"dir1/dir2/file1",
"dir3/dir4/file2",
]
While the expected output is:
"affectedPaths" : [
"https://gerrit.<company>.com/c/parentdir/dir1/dir2/file1",
"https://gerrit.<company>.com/c/parentdir/dir3/dir4/file2",
]
The affectedPaths value is intentionally a path that is relative to the root of the source code repository. This will not be changed.
You'll need to append your own parent information if you want to use the values of affectedPaths in a different way. That is not a task that is suited to the git plugin.