Skip to content

Commit

Permalink
Added the branch creation logic (#2)
Browse files Browse the repository at this point in the history
* Added the branch creation logic

* Added the required inputs to action.yml file

* Added logic to delete branch if it already exists

* Added some debug commands to check for failure

* Added the ability to create a commit

* Added create or replace branch if it exists

* Added the documentation for the token input
  • Loading branch information
Thejus-Paul authored Feb 26, 2023
1 parent 6ea8f61 commit 2537d95
Show file tree
Hide file tree
Showing 6 changed files with 8,075 additions and 519 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# bump-gem-action

[![DeepScan grade](https://deepscan.io/api/teams/20541/projects/23984/branches/733494/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=20541&pid=23984&bid=733494)

The GitHub action to bump the gem or engine version from the pull request labels.

## Inputs
Expand All @@ -8,13 +10,18 @@ The GitHub action to bump the gem or engine version from the pull request labels

**Required** The labels of the pull request separated by comma.

### `token`

**Required** The GitHub token to authenticate with GitHub API.

## Example usage

```yaml
- name: Bump gem version
uses: Thejus-Paul/bump-gem-action@main
with:
labels: ${{ join(github.event.pull_request.labels.*.name, ',') }}
token: ${{ secrets.GITHUB_TOKEN }}
```
## Local development
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ inputs:
labels:
description: 'Provide a comma separated list of labels passed to the PR for the version bump.'
required: true
default: 'patch'
token:
description: 'Provide a GitHub token for branch creation and PR creation.'
required: true
branch:
description: 'Provide a branch name to be used for the PR.'
required: false
default: 'bump-gem-version'
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
Loading

0 comments on commit 2537d95

Please sign in to comment.