Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×Hi Team,
I am trying to add an automation rule in Jira cloud to create a branch in Gitlab using condition: Send Web request
Below are the my settings:
Web request url: https://gitlab.com/api/v4/projects/<group_name>%2f<project_name>/repository/branches
HTTP Method: POST
Web Request body: Custom data
branch={{issue.customfield_10043}}&ref=main
Headers:
Headers "PRIVATE-TOKEN: glpt-xxxxxxxxxxx"
Content-Type: application/x-www-form-urlencoded
Note that i also tried to change the project id to use project_id instead of url encode
also, i tried with Content-Type application/json but still i am getting below error when trying to validate the web request.
Response code: 404
{ "message": "404 Project Not Found" }
When i tried to run the same web request via curl POST command it works (meaning branch is created in gitlab).
Is there anything i am missing or not configured correctly ?
Please assist
Regards,
Azeem
Welcome to the community.
In coding <> will not be correct, how do you provide the project ID, have you created a variable for this in the automation or set is to a default value?
Please show the automation rule in detail.
1. images that show your complete rule.
2. images showing the details of any relevant actions/conditions/branches.
3. images showing the Audit Log details for the rule execution.
Did you use <> in your url? For me this looks like an issue.
Did you try use same configuration e.g. in postman or in CLI?
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seba,
Thank you for the quick response.
Nope I didn't use <>
yes the curl request with same header data was successful, meaning able to create branch in gitlab .
Regards,
Azeem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.