openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
124 stars 81 forks source link

Replace deprecated GetMergeRequestChanges function #1718

Open zakisk opened 2 weeks ago

zakisk commented 2 weeks ago

This will replace deprecated GetMergeRequestChanges function to new function ListMergeRequestDiffs and related changes in unit test with respect to return types and api url changes

fix https://github.com/openshift-pipelines/pipelines-as-code/issues/1708

Signed-off-by: Zaki Shaikh zashaikh@zashaikh-thinkpadp1gen4i.bengluru.csb

Submitter Checklist

zakisk commented 1 day ago

@chmouel go testing tests are failing because of replacing deprecated function with recommended.

chmouel commented 1 day ago

that pr should have fix it, isnt it?

zakisk commented 1 day ago

that pr should have fix it, isnt it?

which PR?

chmouel commented 1 day ago

this PR here you just submitted, this should fix #1708 which is using a linter annotation to avoid that error, in this pr you are submitting you have removed it so it is failing, you should use the new function from the go-gitlab library to not have that error

piyush-garg commented 1 day ago

Just FYI, this new function/api is available from gitlab 16.11 https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-request-diffs