Hi
I am using HTTPS rest API to push:
curl -i -X PUT -u user:pass -F sourceCommitId=12345 -Fcontent=@file.txt -F branch=master…etc
How can I define different committer/author for this commit?
Thanx in advance
Noam
Hi
I am using HTTPS rest API to push:
curl -i -X PUT -u user:pass -F sourceCommitId=12345 -Fcontent=@file.txt -F branch=master…etc
How can I define different committer/author for this commit?
Thanx in advance
Noam
Welcome to the Atlassian developer community @noamgershi,
The great thing about Atlassian is that we have so many APIs to choose from! For your case, I can’t tell which one you are talking about. Maybe Bitbucket because of the reference to committer? But still, there are different auth mechanisms across Bitbucket Server/Data Center vs Bitbucket Cloud.
Maybe you could have a look at the following to see if it helps prompt for more context so that we can help:
thanx for the reply.
I am following: From Java do PUT in BitBucket
So I am using bitbucket and https rest api version 1.0. and I want to define the committer and the author so they will be different.
That means you are using the “PUT
/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path}” endpoint of the “browse” REST endpoint for Bitbucket Data Center (documentation here).
I took a quick look at the server-side source code for this REST endpoint (com/atlassian/stash/internal/rest/content/ContentResource.java) and based on what I saw looks like GIT_COMMITTER and GIT_AUTHOR will always be set to the current authenticated user when using this REST endpoint. As of Bitbucket v8.15.x there is no ability to change them through this REST endpoint - at least none that I could see.