https://github.com/prakhardoneria/github-git-api
GitHub access API
https://github.com/prakhardoneria/github-git-api
Last synced: 7 months ago
JSON representation
GitHub access API
- Host: GitHub
- URL: https://github.com/prakhardoneria/github-git-api
- Owner: PrakharDoneria
- Created: 2024-08-03T08:03:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-24T11:36:29.000Z (about 1 year ago)
- Last Synced: 2025-04-06T07:34:06.564Z (7 months ago)
- Language: TypeScript
- Homepage: https://sketchware.deno.dev
- Size: 471 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Base URL
[https://sketchware.deno.dev/](https://sketchware.deno.dev/)
### Endpoints
1. **Create Repository**
- **URL:** `/repos`
- **Method:** `POST`
- **Description:** Creates a new repository for the authenticated user.
- **Request Body:** `{ "name": "new-repo", "description": "A newly created repository.", "private": false }`
- **Response:** Details of the newly created repository.2. **Delete Repository**
- **URL:** `/repos/{owner}/{repo}`
- **Method:** `DELETE`
- **Description:** Deletes the specified repository for the authenticated user.
- **Response:** Confirmation of successful deletion.3. **Pull Requests**
- **URL:** `/repos/{owner}/{repo}/pulls`
- **Method:** `GET`
- **Description:** Retrieves the list of pull requests for the specified repository.
- **Response:** List of pull requests with details.4. **Push File to Repository**
- **URL:** `/repos/{owner}/{repo}/contents/{path}`
- **Method:** `PUT`
- **Description:** Uploads a file to the specified path in the repository and commits the change.
- **Request Body:** `{ "message": "Commit message", "content": "Base64-encoded content", "branch": "branch-name" }`
- **Response:** Details of the pushed file and commit.### Usage
For detailed usage and endpoint descriptions, please refer to the [Documentation](Documentation/).
### Running the Server
To run the server, execute the following command:
```sh
deno run --allow-net index.ts
```