Skip to content

Commit 77149e8

Browse files
committed
chore: more config and setup fixes
1 parent c93f756 commit 77149e8

27 files changed

+1196
-983
lines changed

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Canvas API
2+
CANVAS_DOMAIN=https://(school_domain).instructure.com/api/v1/
3+
4+
# Discord API
5+
TOKEN=your_discord_bot_token
6+
CLIENT_ID=your_discord_client_id
7+
GUILD_ID=your_discord_guild_id
8+
9+
# Supabase
10+
SUPABASE_URL=your_supabase_url
11+
SUPABASE_ANON=your_supabase_key
12+
13+
# Environment
14+
NODE_ENV=development

.eslintrc

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
2727

28-
- OS: [e.g. iOS]
29-
- Browser [e.g. chrome, safari]
30-
- Version [e.g. 22]
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3131

3232
**Smartphone (please complete the following information):**
3333

34-
- Device: [e.g. iPhone6]
35-
- OS: [e.g. iOS8.1]
36-
- Browser [e.g. stock browser, safari]
37-
- Version [e.g. 22]
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3838

3939
**Additional context**
4040
Add any other context about the problem here.

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: "20.x"
19+
- run: npm ci
20+
- run: npm run build --if-present
21+
- run: npm test
22+
- run: npm run lint

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact=true
2+
package-lock=false

.prettierignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Node modules
2+
node_modules
3+
4+
# Next.js build output
5+
.next
6+
out
7+
dist
8+
9+
# Yarn lock file
10+
yarn.lock
11+
bun.lockb
12+
13+
# Configuration files
14+
package-lock.json
15+
16+
# Logs
17+
logs
18+
*.log
19+
20+
# Coverage directory used by testing tools
21+
coverage
22+
23+
# Miscellaneous
24+
.DS_Store
25+
Thumbs.db
26+
27+
# Public and static directories (if you want to keep them untouched)
28+
public
29+
static
30+
31+
# Specific file types (optional, if you don't want Prettier to format them)
32+
*.min.js
33+
*.min.css
34+
*.svg

.prettierrc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"trailingComma": "all",
3-
"tabWidth": 4,
4-
"semi": true,
5-
"singleQuote": false,
6-
"quoteProps": "preserve"
7-
}
2+
"bracketSpacing": true,
3+
"semi": true,
4+
"trailingComma": "all",
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"endOfLine": "lf"
8+
}

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to Canvas Discord Bot
2+
3+
First off, thank you for considering contributing to Canvas Discord Bot! It's people like you that make this bot such a great tool.
4+
5+
## Where do I go from here?
6+
7+
If you've noticed a bug or have a feature request, make sure to check our [Issues](https://github.com/ICEPrey/Canvas-Discord-Bot/issues) page to see if someone else has already created a ticket. If not, go ahead and [make one](https://github.com/ICEPrey/Canvas-Discord-Bot/issues/new)!
8+
9+
## Fork & create a branch
10+
11+
If this is something you think you can fix, then [fork Canvas Discord Bot](https://github.com/ICEPrey/Canvas-Discord-Bot/fork) and create a branch with a descriptive name.
12+
13+
A good branch name would be (where issue #325 is the ticket you're working on):
14+
15+
git checkout -b 325-add-japanese-translations
16+
17+
## Get the test suite running
18+
19+
Make sure you're using the latest version of Bun. Install the development dependencies:
20+
21+
bun install
22+
23+
## Implement your fix or feature
24+
25+
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first.
26+
27+
## Make a Pull Request
28+
29+
At this point, you should switch back to your main branch and make sure it's up to date with the main branch:
30+
31+
```
32+
git remote add upstream git@github.com:ICEPrey/Canvas-Discord-Bot.git
33+
git checkout main
34+
git pull upstream main
35+
```
36+
37+
Then update your feature branch from your local main branch, and push it!
38+
39+
```
40+
git checkout 325-add-japanese-translations
41+
git rebase main
42+
git push --set-upstream origin 325-add-japanese-translations
43+
```
44+
45+
Finally, go to GitHub and [make a Pull Request](https://github.com/ICEPrey/Canvas-Discord-Bot/compare) :D
46+
47+
## Keeping your Pull Request updated
48+
49+
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
50+
51+
To learn more about rebasing in Git, there are a lot of [good](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) [resources](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase) but here's the suggested workflow:
52+
53+
```
54+
git checkout 325-add-japanese-translations
55+
git pull --rebase upstream main
56+
git push --force-with-lease origin 325-add-japanese-translations
57+
```
58+
59+
## Code review
60+
61+
A team member will review your pull request and provide feedback. Please be patient as review times may vary.
62+
63+
## Thank you!
64+
65+
Canvas Discord Bot is a community effort. We encourage you to pitch in and join the team!
66+
67+
Thanks! ❤️ ❤️ ❤️
68+
69+
Canvas Discord Bot Team

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666

6767
### Built With
6868

69-
- [![supabase][supabase]][supabase-url]
70-
- [![bun][bun]][bun-url]
71-
- [![discordjs][discordjs]][discordjs-url]
72-
- [![typescript][typescript]][typescripturl]
69+
- [![supabase][supabase]][supabase-url]
70+
- [![bun][bun]][bun-url]
71+
- [![discordjs][discordjs]][discordjs-url]
72+
- [![typescript][typescript]][typescripturl]
7373

7474
<p align="right">(<a href="#readme-top">back to top</a>)</p>
7575

@@ -87,21 +87,21 @@ Supabase Account: Set up a Supabase account at supabase.io to utilize their data
8787

8888
### Prerequisites
8989

90-
- bun
91-
```sh
92-
bun add bun@latest -g
93-
```
90+
- bun
91+
```sh
92+
bun add bun@latest -g
93+
```
9494

9595
### Installation
9696

9797
1. Clone the repo
98-
```sh
99-
git clone https://github.com/ICEPrey/Canvas-Discord-Bot
100-
```
98+
```sh
99+
git clone https://github.com/ICEPrey/Canvas-Discord-Bot
100+
```
101101
2. Install NPM packages
102-
```sh
103-
bun install
104-
```
102+
```sh
103+
bun install
104+
```
105105

106106
### Start the project
107107

0 commit comments

Comments
 (0)