Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented 'pull-request' handler for pull requests #6

Merged
merged 20 commits into from
Oct 14, 2020
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The goal of this action is to produce helpful messages on your Discord server ba

- [x] Release
- [ ] Pull Request
- [ ] Push (branches / tags)
- [x] Push (branches / tags)
- [ ] Page build

## Getting Started:
Expand All @@ -21,8 +21,10 @@ The webhook URL to use. This should be in a repository secret and the secret sho
#### `handler`
Handler defines background logic of the action. Currently avaiable handlers:
- `release`: Publishes message to your discord server when release is created.
- `push`: Publishes message to your discord server when push action occurs.
---
### Example
#### Release Handler
```yaml
name: Discord Webhook Messages
on:
Expand All @@ -39,6 +41,24 @@ jobs:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
handler: 'release'
```
#### Push Handler
```yaml
name: Discord Webhook Messages
on:
push:
branches:
- '*'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Discord Webhook
uses: bythope/[email protected]
with:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
handler: 'push'
```
## Contributing
Expand Down
Loading