Skip to content

Commit 28fdd1d

Browse files
committed
update the the github actions
1 parent 301bdf8 commit 28fdd1d

66 files changed

Lines changed: 1201 additions & 1136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/ci.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@ jobs:
1818
cache: 'npm'
1919
- run: npm i
2020
- run: npm run lint
21+
22+
format:
23+
name: prettify
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
cache: 'npm'
31+
- run: npm i
32+
- run: npm run format
2133

22-
test:
34+
test:
2335
name: build-app
2436
runs-on: ubuntu-latest
2537
steps:

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

CONTRIBUTING.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ Thank you for considering contributing to [Project Name]! We appreciate your hel
44

55
## Getting Started
66

7-
* **Project Overview:** Briefly describe what the project is about and its goals.
8-
* **Community:** Link to any relevant community channels (e.g., Slack, Discord, forum).
9-
* **Code of Conduct:** Link to your project's Code of Conduct (if applicable).
7+
- **Project Overview:** Briefly describe what the project is about and its goals.
8+
- **Community:** Link to any relevant community channels (e.g., Slack, Discord, forum).
9+
- **Code of Conduct:** Link to your project's Code of Conduct (if applicable).
1010

1111
## Reporting Issues
1212

13-
* **Where to Report:** Explain where users should report issues (e.g., GitHub Issues, email).
14-
* **Issue Templates:** Link to any issue templates you use (e.g., GitHub issue templates).
15-
* **How to Report:** Provide clear instructions on how to report an issue, including what information to include (e.g., steps to reproduce, expected vs. actual behavior).
13+
- **Where to Report:** Explain where users should report issues (e.g., GitHub Issues, email).
14+
- **Issue Templates:** Link to any issue templates you use (e.g., GitHub issue templates).
15+
- **How to Report:** Provide clear instructions on how to report an issue, including what information to include (e.g., steps to reproduce, expected vs. actual behavior).
1616

1717
## Submitting Pull Requests
1818

19-
* **Forking and Cloning:** Explain how to fork and clone the repository.
20-
* **Branching Strategy:** Describe your branching strategy (e.g., feature branches, development branch).
21-
* **Pull Request Guidelines:**
22-
* Describe how to create a pull request.
23-
* Explain the review process.
24-
* Mention any specific requirements for pull requests (e.g., code style, tests).
25-
* **Testing:** Explain how to test your changes.
26-
* **Code Style:**
27-
* Describe your project's code style (e.g., linters, formatters).
28-
* Provide links to any style guides or documentation.
19+
- **Forking and Cloning:** Explain how to fork and clone the repository.
20+
- **Branching Strategy:** Describe your branching strategy (e.g., feature branches, development branch).
21+
- **Pull Request Guidelines:**
22+
- Describe how to create a pull request.
23+
- Explain the review process.
24+
- Mention any specific requirements for pull requests (e.g., code style, tests).
25+
- **Testing:** Explain how to test your changes.
26+
- **Code Style:**
27+
- Describe your project's code style (e.g., linters, formatters).
28+
- Provide links to any style guides or documentation.
2929

3030
## Additional Guidelines
3131

32-
* **Documentation:** Explain how to contribute to the project's documentation.
33-
* **Translations:** Explain how to contribute translations.
34-
* **Contact:** Provide contact information for project maintainers (e.g., email, social media).
35-
* **License:** Mention the project's license.
32+
- **Documentation:** Explain how to contribute to the project's documentation.
33+
- **Translations:** Explain how to contribute translations.
34+
- **Contact:** Provide contact information for project maintainers (e.g., email, social media).
35+
- **License:** Mention the project's license.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
![OpenMux Banner](https://yourimageurl.com/banner.png)
44

5-
65
## 🚀 Introduction
76

87
**OpenMux** is an open-source alternative to Mux, providing a scalable and developer-friendly API for video encoding, streaming, and playback. Whether you're building a video-sharing platform, a live-streaming service, or an educational content platform, OpenMux gives you the tools you need without the vendor lock-in.
@@ -40,23 +39,27 @@
4039
### Steps
4140

4241
1. **Clone the Repository**:
42+
4343
```sh
4444
git clone https://github.com/yourusername/openmux.git
4545
cd openmux
4646
```
4747

4848
2. **Install Dependencies**:
49+
4950
```sh
5051
npm install
5152
```
5253

5354
3. **Set Up Environment Variables**:
55+
5456
```sh
5557
cp .env.example .env
5658
# Update the .env file with your configurations
5759
```
5860

5961
4. **Run Migrations (for PostgreSQL users)**:
62+
6063
```sh
6164
npm run migrate
6265
```
@@ -71,19 +74,22 @@
7174
Check out our full API docs at [https://docs.openmux.io](https://docs.openmux.io).
7275

7376
### Example: Upload a Video
77+
7478
```sh
7579
curl -X POST "https://api.openmux.io/videos" \
7680
-H "Authorization: Bearer YOUR_API_KEY" \
7781
-F "file=@video.mp4"
7882
```
7983

8084
### Example: Retrieve Video Details
85+
8186
```sh
8287
curl -X GET "https://api.openmux.io/videos/{video_id}" \
8388
-H "Authorization: Bearer YOUR_API_KEY"
8489
```
8590

8691
### Web3 Example: Verify NFT Ownership for Video Access
92+
8793
```sh
8894
const ethers = require("ethers");
8995
const contractAddress = "0xYourContractAddress";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { handler } from "auth";
22

3-
export const { GET, POST } = handler
3+
export const { GET, POST } = handler;

apps/web/app/api/payment/subscribe/route.ts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ export async function POST(req: NextRequest) {
1818
if (!parsedPlan.success) {
1919
return new Response(
2020
JSON.stringify({ error: "Invalid subscription plan" }),
21-
{ status: 400 }
21+
{ status: 400 },
2222
);
2323
}
2424

2525
// Return an error if txHash or userId are missing
2626
if (!txHash || !userId) {
2727
return new Response(
2828
JSON.stringify({ error: "Missing required fields" }),
29-
{ status: 400 }
29+
{ status: 400 },
3030
);
3131
}
3232

3333
// Set up connection to Solana network
3434
const connection = new Connection(clusterApiUrl(SOLANA_NETWORK));
3535

3636
// Attempt to get the transaction info
37-
const txInfo = await connection.getParsedTransaction(txHash, { commitment: "confirmed" });
37+
const txInfo = await connection.getParsedTransaction(txHash, {
38+
commitment: "confirmed",
39+
});
3840

3941
// Return an error if the transaction is not found
4042
if (!txInfo) {
41-
return new Response(
42-
JSON.stringify({ error: "Transaction not found" }),
43-
{ status: 404 }
44-
);
43+
return new Response(JSON.stringify({ error: "Transaction not found" }), {
44+
status: 404,
45+
});
4546
}
4647

4748
// Check if the transaction failed (i.e., there was an error in the meta data)
4849
if (txInfo.meta?.err) {
49-
return new Response(
50-
JSON.stringify({ error: "Transaction failed" }),
51-
{ status: 400 }
52-
);
50+
return new Response(JSON.stringify({ error: "Transaction failed" }), {
51+
status: 400,
52+
});
5353
}
5454

5555
// Update subscription in the database
@@ -61,15 +61,14 @@ export async function POST(req: NextRequest) {
6161
// Return a success response
6262
return new Response(
6363
JSON.stringify({ message: "Subscription updated successfully" }),
64-
{ status: 200 }
64+
{ status: 200 },
6565
);
6666
} catch (error) {
6767
console.error("Error processing request:", error);
6868

6969
// Return a generic internal server error if something goes wrong
70-
return new Response(
71-
JSON.stringify({ error: "Internal server error" }),
72-
{ status: 500 }
73-
);
70+
return new Response(JSON.stringify({ error: "Internal server error" }), {
71+
status: 500,
72+
});
7473
}
7574
}

apps/web/app/api/payment/verify/route.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { clusterApiUrl, Connection } from "@solana/web3.js";
33
import prisma from "@repo/db";
44

55
// Solana connection
6-
const connection = new Connection(clusterApiUrl("mainnet-beta"), { commitment: "confirmed" });
6+
const connection = new Connection(clusterApiUrl("mainnet-beta"), {
7+
commitment: "confirmed",
8+
});
79

810
export async function POST(req: NextRequest) {
911
try {
@@ -12,10 +14,9 @@ export async function POST(req: NextRequest) {
1214

1315
// Check if userId is provided
1416
if (!userId) {
15-
return new Response(
16-
JSON.stringify({ error: "Unauthorized" }),
17-
{ status: 401 }
18-
);
17+
return new Response(JSON.stringify({ error: "Unauthorized" }), {
18+
status: 401,
19+
});
1920
}
2021

2122
// Fetch the transaction signature from the database
@@ -29,7 +30,7 @@ export async function POST(req: NextRequest) {
2930
if (!signature) {
3031
return new Response(
3132
JSON.stringify({ error: "Signature not found in the db" }),
32-
{ status: 404 }
33+
{ status: 404 },
3334
);
3435
}
3536

@@ -42,14 +43,13 @@ export async function POST(req: NextRequest) {
4243
success: true,
4344
status: txStatus,
4445
}),
45-
{ status: 200 }
46+
{ status: 200 },
4647
);
47-
4848
} catch (error) {
4949
console.error("Error verifying transaction:", error);
5050
return new Response(
5151
JSON.stringify({ error: "Failed to verify transaction" }),
52-
{ status: 500 }
52+
{ status: 500 },
5353
);
5454
}
5555
}

0 commit comments

Comments
 (0)