How to use createCommitOnBranch? #24599
-
I am trying to create a new commit using the github graphql api, using the createCommitOnBranch mutation. What value should one use for expectedHeadOid: “???”? How can one get such value from the Graphql API? This is my attempt so far: { mutation m1 { createCommitOnBranch( input: { branch: {repositoryNameWithOwner: “some_repo/some_owner”, branchName: “main” }, message: {headline: “headline!”}, fileChanges: { additions: {path: “README.md”, contents: “SGVsbG8gV29ybGQ=”} } expectedHeadOid: “???” } ) } } |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Resolved, see:
How to create new commit with the github graphql API?
github, graphql
asked by
Oded
on 05:05AM - 02 Jul 22 UTC
|
Beta Was this translation helpful? Give feedback.
-
Thank you for circling back here with the solution, @frmoded! |
Beta Was this translation helpful? Give feedback.
Resolved, see:
How to create new commit with the github graphql API?