Skip to content

Commit

Permalink
Add info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Jan 23, 2025
1 parent fe14aae commit 39f10a1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
52 changes: 50 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,56 @@ fictional bed and breakfast.

## About

TODO
This is an example action that processes reservation requests for a fictional
bed and breakfast. It is used to demonstrate how to build an
[IssueOps](https://issue-ops.github.io/docs/) action.

Depending on the value of the `action` input (described in the following
section), this action will do one of the following:

### `init`

- Moves the issue to the `New Reservations` column in the
[Bear Creek Honey Farm Reservations](https://github.com/orgs/issue-ops/projects/3)
project.

### `reserve`

- Checks if there are any conflicting reservations based on the requested dates
and number of available, matching rooms.
- If there are too many conflicts, a comment is added to the issue and the
reservation is not confirmed.
- If there are no conflicts, the reservation is confirmed and the issue is moved
to the `Confirmed Reservations` column in the
[Bear Creek Honey Farm Reservations](https://github.com/orgs/issue-ops/projects/3)
project.

### `cancel`

- Adds a comment to the issue indicating that the reservation has been canceled.
- Moves the issue to the `Canceled Reservations` column in the
[Bear Creek Honey Farm Reservations](https://github.com/orgs/issue-ops/projects/3)
project.
- Closes the issue.

### `expire`

- Checks for any issues where the reservation end date has passed.
- If the end date has passed, adds a comment to the issue indicating that the
reservation has expired.
- Moves the issue to the `Expired Reservations` column in the
[Bear Creek Honey Farm Reservations](https://github.com/orgs/issue-ops/projects/3)
project.
- Adds a comment confirming the reservation has expired.
- Closes the issue.

## Inputs

TODO
| Name | Description |
| --------------------- | ------------------------------------------------------------------------------- |
| `action` | Action to perform (`init`, `reserve`, `cancel`, or `expire`) |
| `github_token` | GitHub token to use for authentication (e.g. `${{ github.token }}`) |
| `issue_body` | Issue body as a JSON string (not required when `action` is set to `expire`) |
| `issue_template_path` | Path to the issue template file (e.g. `.github/ISSUE_TEMPLATE/reservation.yml`) |
| `project_number` | Number of the project board where reservations are managed |
| `workspace` | Path to the workspace directory (e.g. `${{ github.workspace }}`) |
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branding:

inputs:
action:
description: The action to take (`init`, `reserve`, `cancel`, or 'expire').
description: The action to take (`init`, `reserve`, `cancel`, or `expire`).
required: true
github_token:
description: The GitHub token to use for interacting with the GitHub API.
Expand Down

0 comments on commit 39f10a1

Please sign in to comment.