Set commit message through Pull Request API?

Sarvin Coachbuilder July 15, 2021

Using the API I can create pull requests and I can merge through pull requests. For certain PRs I'd like to add [skip ci] to the commit message when merging.

Is it possible to set the commit message when merging through PRs so that I can add my own commit message?

 

Edit:

I can add a message when using a merge_comit but not with fast_forward. 

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2021

Hi @Sarvin Coachbuilder,

A fast forward merge won't create a merge commit, it will update the pointer of the destination branch to match the merged branch, when possible. So, there is no merge commit to add a message to.

If you want to use fast forward, one thing you can do is to have[skip ci] in the last commit of the source branch of the PR. This way, a Pipelines build won't run when you make the fast forward merge.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Sarvin Coachbuilder July 21, 2021

Thanks Theodora.

 

For other's that find this in the future; if you need to add a commit message use merge.

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events