You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to determine if a merge request already exists. We need a method called merge_request_exists? to find out if the request needs to be created or not.
Currently this is what I am doing in my own wrapper code.
# merge_request fetches all the available merge requests with given state# this is supposed to work but the data being returned is not correctdefmerge_request(src,dst,email=author_email)merge_requests.find_all{ |mr| mr.target_branch == dstandmr.source_branch == srcandmr.author.email == email}end#retrives all the current merge requests with the state filtereddefmerge_requests(id=project_id,state='active')client.merge_requests(id).find_all{|mr| mr.state == state}end
The text was updated successfully, but these errors were encountered:
merge_requestdoesn't fetch all the available merge requests. See the docs.
Client only wraps the REST API provided by GitLab. Anything else is up to you.
Basically you need to get all merge requests for a project and then filter that array using ruby.
Currently there is no way to determine if a merge request already exists. We need a method called merge_request_exists? to find out if the request needs to be created or not.
Currently this is what I am doing in my own wrapper code.
The text was updated successfully, but these errors were encountered: