Answer the question
In order to leave comments, you need to log in
Rails: git commit, git pull - how to create a commit?
Most likely, the question will seem chaotic, but the fact that I myself understand the issue very superficially is to blame.
Therefore - I ask you not to judge me strictly.
I am creating a new rail application and it became necessary to create Pull Requests to a specific GitHub repository through this web application.
As a basis, it was decided to take the simplest and most understandable gem - Ghee
. However, I ran into the problem of creating a commit. How to create it on the server and how to attach it with Pull Request'y ?
Answer the question
In order to leave comments, you need to log in
Maybe I didn’t understand the question ... But it seems something like this:
Push a commit to a new branch:
gh.repos("user","repo").git.commits.create({
:message => "message of commit",
:tree => "new_branch"
})
gh.repos("user", "repo").pulls.create({
:title=>"take my awesome code!",
:body=>"This code is so awesome. Let me tell you why...",
:base=>"master",
:head=>"new_branch"
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question