Skip to content

Commit

Permalink
📝 Document commit-monitor action in README.md (#9)
Browse files Browse the repository at this point in the history
The `commit-monitor` action has been documented and the updated
README.md file is now available in the `commit-monitor` directory.

---------

Co-authored-by: PR Pilot <bot@pr-pilot.ai>
Co-authored-by: Marco Lamina <mlamina09@gmail.com>
  • Loading branch information
3 people authored Apr 14, 2024
1 parent c14debc commit 977b880
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions commit-monitor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Commit-Monitor Action

The `commit-monitor` action is designed to enhance your workflow by allowing you to define specific keywords or commands (e.g., `/task`) within your commit messages. When these are detected, the action can automatically delegate follow-up work based on the content of your commit message.

## Workflow Ideas

- **Generate Documentation** Use a `/document` command to automatically create documentation for the code you committed
- **Let AI finish your work** Commit code stubs and use an `/implement` command to let the AI agent build the rest
- **Create issues from commits** Use the `/issue` keyword to generate a new Github issue

## Usage

To use the `commit-monitor` action in your project, you'll need to include it in your GitHub workflow files. Define the keywords or commands you wish to monitor in your commit messages, and configure the action to perform the desired follow-up tasks when those keywords are detected.

### Inputs

- `sdk-version`: (Optional) Specifies the PR Pilot SDK version to use. Default is `1.0.3`.
- `api-key`: (Required) Your API key for PR Pilot.
- `trigger-keyword`: (Required) The keyword to trigger task creation.

### Example Workflow

```yaml
name: Listen for /document command

on:
push:

jobs:
monitor-commit:
runs-on: ubuntu-latest
steps:
- name: Monitor Commit
uses: PR-Pilot-AI/smart-actions/commit-monitor@v1
with:
# API key for PR Pilot must be defined as a secret in the repository
api-key: ${{ secrets.PR_PILOT_API_KEY }}
# Keyword that the AI agent will react to
trigger-keyword: /document
```

0 comments on commit 977b880

Please sign in to comment.