mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat: add merge/close PR buttons to Discord PR notifications
This commit is contained in:
parent
d40f34cc4d
commit
44b8fead78
9 changed files with 223 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Actions
|
||||
|
||||
User action endpoints allow commenting on issues, merging PRs, and adding reactions. All action endpoints require a valid Bearer token from the OAuth flow.
|
||||
User action endpoints allow commenting on issues, merging/closing PRs, and adding reactions. All action endpoints require a valid Bearer token from the OAuth flow.
|
||||
|
||||
## Authentication
|
||||
|
||||
|
|
@ -70,6 +70,32 @@ Merges a pull request.
|
|||
|
||||
**Response:** `200` with GitHub merge response.
|
||||
|
||||
### Close Pull Request
|
||||
|
||||
```
|
||||
POST /api/close
|
||||
```
|
||||
|
||||
Closes a pull request without merging.
|
||||
|
||||
**Request Body:**
|
||||
|
||||
```json
|
||||
{
|
||||
"owner": "org",
|
||||
"repo": "repo",
|
||||
"pullNumber": 42
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------ | ------ | -------- | ----------------------- |
|
||||
| `owner` | string | Yes | Repository owner |
|
||||
| `repo` | string | Yes | Repository name |
|
||||
| `pullNumber` | number | Yes | Pull request number |
|
||||
|
||||
**Response:** `200` with GitHub update response.
|
||||
|
||||
### Add Reaction
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ https://your-worker.workers.dev
|
|||
| `DELETE` | `/auth/token/:userId` | None | Revoke user token |
|
||||
| `POST` | `/api/comment` | Bearer token | Create issue comment |
|
||||
| `POST` | `/api/merge` | Bearer token | Merge pull request |
|
||||
| `POST` | `/api/close` | Bearer token | Close pull request |
|
||||
| `POST` | `/api/react` | Bearer token | Add reaction to issue |
|
||||
| `GET` | `/admin` | Admin session | Config console UI |
|
||||
| `GET` | `/admin/api/routes` | Admin session | List routes |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue