Skip to content

Commit

Permalink
Merge pull request #9 from simplybusiness/add-doc
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
Punit Jain authored Feb 9, 2021
2 parents 586e5e3 + 81d66e1 commit 40c4633
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# Dobby

“Dobby is free.”

A Github action which provides chat-ops functionality. You can comment on Pull request to perform various operations.
Currently it supports bumping version for a gem.

## Bump version

### Installation

Add a file to your github workflow `.github/workflows/version-update.yml` with following content:

```yaml

name: "version update action"
on:
issue_comment:
types: [created]
jobs:
pr_commented:
runs-on: ubuntu-20.04
if: startsWith(github.event.comment.body, '/dobby')

steps:
# TODO: remove this step after the action is public
- name: action checkout
uses: actions/checkout@v2
with:
repository: simplybusiness/dobby
ref: refs/heads/master
token: ${{ secrets.ACCESS_TOKEN }}
path: ./
- name: 'bump version'
uses: ./
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Change to the file path where you keep the Gem's version.
# It is usually `lib/<gem name>/version.rb` or in the gemspec file.
VERSION_FILE_PATH: <VERSION FILE PATH>
```
### How to use
1. Add the following comment in the pull request to bump the version.
```
/dobby version <semver level>
```
where semver level can be minor/major/patch.

2. You can see bot will add a comment on Pull request.

![Version update comment](docs/images/version-update.png)

Updates the gem version by user input.
Binary file added docs/images/version-update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 40c4633

Please sign in to comment.