I am trying to perform a few operations on GitHub APIs.. and I am looking to delete the pull requests with the pull id and with the title, but I cannot find anything...
to get pull requests I used the following...
pull_req=$(curl -s -u $username:$password https://api.github.com/repos/$username/$repository_name/pulls?state=all | jq -r '.[] | "\(.title) '--' \(.number)"')
echo $pull_req
like as follows:
the following are the pull requests with their id:
adding file333 -- 3
Branch2 -- 2
Create file123 -- 1
the above shows the pull requests for both opened and closed along with the pull request-id...
I want to delete that pull request, using the API
I tried the update from the GitHub docs, but I did not find any changes...
https://docs.github.com/en/rest/reference/pulls#update-a-pull-request
and what does the update exactly do?
does this give a proper deletion?
any other methods using API to delete the pull requests would be very helpful
Thanks in advance...