mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
feat: add merge/close PR buttons to Discord PR notifications
This commit is contained in:
9 files changed
+223
-3
No files matched your search
+27
-1
@@ -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 |
|
||||
|
||||
Reference in new issue
Block a user