-
Notifications
You must be signed in to change notification settings - Fork 0
feat: bot rewrite #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
OfficialSirH
wants to merge
14
commits into
main
Choose a base branch
from
clean-rewrite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a47b681
feat: rewrite a good majority of the bot
OfficialSirH 870fed1
chore: replace string literals with enums/cleanup
OfficialSirH 53bfcf1
fix: correct workflow to not do incorrect actions
OfficialSirH a9675fd
fix: use event enums and fix rotation issues
OfficialSirH 73ca756
chore: resolve DD's requested changes
OfficialSirH 565a9f9
fix: use correct compiler option for downgraded ts
OfficialSirH 8b1f9d5
chore: legibility, format, and types
OfficialSirH b7f6a87
chore: fixed listener issues and requested changes
OfficialSirH ce0305a
chore: make ping role decree funny
OfficialSirH 001916d
chore: add command for stopping rotation
OfficialSirH 9898eeb
chore: some fixes and temp resolution
OfficialSirH 79fd19d
chore: add new decree and bake env lol
OfficialSirH f08ee4d
Barbie Update
Tommyfoxy2 b7327eb
Fixed girls night
Tommyfoxy2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "extends": ["@commitlint/config-angular"], | ||
| "rules": { | ||
| "type-enum": [ | ||
| 2, | ||
| "always", | ||
| ["chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types", "typings"] | ||
| ], | ||
| "scope-case": [0] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| .git | ||
| .github | ||
| .idea | ||
| .vscode | ||
| compose | ||
| coverage | ||
| migrations | ||
| **/node_modules | ||
|
|
||
| **/types | ||
| !**/src/types | ||
| **/dist | ||
|
|
||
| babel.config.cjs | ||
| jest-setup.ts | ||
| jest.config.cjs | ||
| ley.config.mjs | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
|
|
||
| a.ci.sh | ||
| a.sh | ||
|
|
||
| LICENSE | ||
| **/README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| CHAT_CHANNEL=channel_id | ||
| DECREE_CHANNEL=channel_id | ||
| DISCORD_TOKEN=token | ||
| EVENT_ROLE=role_id | ||
| GUILD_ID=guild_id | ||
| PREFIX=! | ||
| STAFF_ROLE=role_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "root": true, | ||
| "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier", "neon/module"], | ||
| "parserOptions": { | ||
| "project": "./tsconfig.eslint.json" | ||
| }, | ||
| "env": { | ||
| "jest": true | ||
| }, | ||
| "globals": { | ||
| "NodeJS": "readonly" | ||
| }, | ||
| "rules": { | ||
| "@typescript-eslint/ban-types": "off", | ||
| "@typescript-eslint/no-extraneous-class": "off", | ||
| "curly": ["error", "all"], | ||
| "eqeqeq": ["error", "always", { "null": "ignore" }], | ||
| "no-eq-null": "off", | ||
| "no-unused-vars": "off", | ||
| "import/extensions": "off", | ||
| "no-useless-constructor": "off", | ||
| "unicorn/require-post-message-target-origin": "off" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * text=auto eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| addReviewers: true | ||
| reviewers: | ||
| - didinele | ||
| numberOfReviewers: 0 | ||
| runOnDraft: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| - name: 'backlog' | ||
| color: '7ef7ef' | ||
| - name: 'bug' | ||
| color: 'd73a4a' | ||
| - name: 'chore' | ||
| color: 'ffffff' | ||
| - name: 'ci' | ||
| color: '0075ca' | ||
| - name: 'dependencies' | ||
| color: '276bd1' | ||
| - name: 'documentation' | ||
| color: '0075ca' | ||
| - name: 'duplicate' | ||
| color: 'cfd3d7' | ||
| - name: 'feature request' | ||
| color: 'fcf95a' | ||
| - name: 'good first issue' | ||
| color: '7057ff' | ||
| - name: 'has PR' | ||
| color: '4b1f8e' | ||
| - name: 'help wanted' | ||
| color: '008672' | ||
| - name: 'in progress' | ||
| color: 'ffccd7' | ||
| - name: 'in review' | ||
| color: 'aed5fc' | ||
| - name: 'invalid' | ||
| color: 'e4e669' | ||
| - name: 'need repro' | ||
| color: 'c66037' | ||
| - name: 'performance' | ||
| color: '80c042' | ||
| - name: 'priority:high' | ||
| color: 'fc1423' | ||
| - name: 'refactor' | ||
| color: '1d637f' | ||
| - name: 'regression' | ||
| color: 'ea8785' | ||
| - name: 'semver:major' | ||
| color: 'c10f47' | ||
| - name: 'semver:minor' | ||
| color: 'e4f486' | ||
| - name: 'semver:patch' | ||
| color: 'e8be8b' | ||
| - name: 'tests' | ||
| color: 'f06dff' | ||
| - name: 'wontfix' | ||
| color: 'ffffff' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Deploy | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - 'Quality Check' | ||
| branches: | ||
| - main | ||
| types: | ||
| - completed | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Deploy | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Install Node v16 | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: 16 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v1 | ||
|
|
||
| - name: Login to DockerHub | ||
| run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Build the images | ||
| run: docker build -t chatsift/kingsdecree:latest -f ./docker/service/Dockerfile . | ||
|
|
||
| - name: Push to DockerHub | ||
| run: docker push --all-tags chatsift/kingsdecree | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: 'PR Automation' | ||
| on: | ||
| pull_request_target: | ||
| jobs: | ||
| triage: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Automatically assign reviewers | ||
| if: github.event.action == 'opened' | ||
| uses: kentaro-m/auto-assign-action@v1.2.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Sync Labels | ||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '.github/labels.yml' | ||
| jobs: | ||
| synclabels: | ||
| name: Sync Labels | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Sync labels | ||
| uses: crazy-max/ghaction-github-labeler@v3 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Quality Check | ||
| on: [push, pull_request] | ||
| jobs: | ||
| quality: | ||
| name: Quality Check | ||
| runs-on: ubuntu-latest | ||
| env: | ||
|
OfficialSirH marked this conversation as resolved.
Outdated
|
||
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | ||
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Install Node.js v16 | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: 16 | ||
| cache: 'yarn' | ||
| cache-dependency-path: yarn.lock | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn --immutable | ||
|
|
||
| - name: Build | ||
| run: yarn build | ||
|
|
||
| - name: ESLint | ||
| run: yarn lint | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| node_modules/ | ||
| dist/ | ||
| types/ | ||
| coverage/ | ||
| .nyc_output/ | ||
| data/ | ||
| volumes/ | ||
| worker/ | ||
| min/ | ||
| node_modules | ||
| .env | ||
|
|
||
| .npmrc | ||
| *.tsbuildinfo | ||
| coverage/* | ||
| dist | ||
|
|
||
| .yarn/* | ||
| !.yarn/patches | ||
| !.yarn/plugins | ||
| !.yarn/releases | ||
| !.yarn/sdks | ||
| !.yarn/versions | ||
| .pnp.* | ||
| logs | ||
| *.log | ||
|
|
||
| .vscode/ | ||
| .idea/ | ||
| *.env | ||
| docs/ | ||
| *.log | ||
| .turbo | ||
|
|
||
| tsconfig.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| yarn commitlint --edit $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| yarn build && yarn lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| node_modules/* | ||
| coverage/* | ||
| **/dist/* | ||
| **/types/* | ||
| docs | ||
| .yarn/* | ||
| .turbo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| { | ||
| "endOfLine": "auto", | ||
| "printWidth": 150, | ||
| "semi": true, | ||
| "tabWidth": 4 | ||
| "printWidth": 120, | ||
| "useTabs": true, | ||
| "singleQuote": true, | ||
| "quoteProps": "as-needed", | ||
| "trailingComma": "all", | ||
| "endOfLine": "lf" | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| nodeLinker: node-modules | ||
|
|
||
| plugins: | ||
| - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
| spec: '@yarnpkg/plugin-interactive-tools' | ||
| - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
| spec: '@yarnpkg/plugin-workspace-tools' | ||
| - path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
| spec: '@yarnpkg/plugin-version' | ||
|
|
||
| yarnPath: .yarn/releases/yarn-3.2.1.cjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM node:16-alpine | ||
| LABEL name "kingsdecree" | ||
|
|
||
| WORKDIR /usr/kingsdecree | ||
|
|
||
| RUN apk add --update \ | ||
| && apk add --no-cache ca-certificates \ | ||
| && apk add --no-cache --virtual .build-deps curl git python3 alpine-sdk | ||
|
|
||
| COPY turbo.json package.json tsconfig.json yarn.lock .yarnrc.yml ./ | ||
|
OfficialSirH marked this conversation as resolved.
Outdated
|
||
| COPY .yarn ./.yarn | ||
|
|
||
| RUN yarn --immutable | ||
|
|
||
| COPY src ./src | ||
|
|
||
| RUN yarn turbo run build | ||
|
OfficialSirH marked this conversation as resolved.
Outdated
|
||
|
|
||
| RUN yarn start | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.