Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# GitHub Api Commit

This action commits to the checked out repo via the graphql mutation `createCommitOnBranch`. This mutation supports
This action commits to the checked-out repo via the graphql mutation `createCommitOnBranch`. This mutation supports
signing commits automatically for the user. This is useful when using a GitHub App to do committing for bot-related
commits and the repo requires signed commits.
commits, and the repo requires signed commits.

It will build a list of file additions and deletions to commit, and just prior to committing will fetch the latest
It will build a list of file additions and deletions to commit, and just before committing will fetch the latest
commit OID from the remote repo. It will commit to whatever branch is currently checked out in the workflow. For
instance, if you create a branch via `git checkout -b my-test-branch` in one of your steps, it will commit to
`my-test-branch`.
Expand All @@ -17,7 +17,7 @@ instance, if you create a branch via `git checkout -b my-test-branch` in one of

```yaml
- name: Commit changes
uses: grafana/github-api-commit-action@217dd3b6fd87795791baec73516d331c3839bc42 # v0.4.1
uses: grafana/github-api-commit-action@4eceeb68aa8b00d6acdf43eef81e2ceea9b432fb # v0.4.2
with:
commit-message: "<commit-message>" # Commit message defaults to "Commit performed by grafana/github-api-commit-action"
create-branch-on-remote: true | false # Whether to create the branch on the remote if it doesn't exist: Defaults to false
Expand All @@ -36,7 +36,7 @@ instance, if you create a branch via `git checkout -b my-test-branch` in one of
private_key: ${{ secrets.GITHUB_APP_PRIVATE_KEY }}

- name: Commit changes
uses: grafana/github-api-commit-action@217dd3b6fd87795791baec73516d331c3839bc42 # v0.4.1
uses: grafana/github-api-commit-action@4eceeb68aa8b00d6acdf43eef81e2ceea9b432fb # v0.4.2
with:
commit-message: "<commit-message>" # Commit message defaults to "Commit performed by grafana/github-api-commit-action"
create-branch-on-remote: true | false # Whether to create the branch on the remote if it doesn't exist already: Defaults to false
Expand Down Expand Up @@ -75,6 +75,10 @@ Example: `feat: add new commit signing feature`
Since we use the `squash-merge` strategy, PR titles are required to be in Conventional Commits format to ensure that the
merge commit message is defaulted correctly.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

# (Legacy) GitHub Api Commit

> [!NOTE]
Expand Down
Loading