Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-set-voice-channel-status-permission
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza authored Mar 22, 2024
2 parents c2827e4 + 19327a5 commit a8b45c2
Show file tree
Hide file tree
Showing 246 changed files with 12,886 additions and 6,716 deletions.
2 changes: 1 addition & 1 deletion .eslintplugin/index.ts → .eslint-plugin-local/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const schema = [
},
},
},
];
] as const;

export = {
rules: {
Expand Down
9 changes: 9 additions & 0 deletions .eslint-plugin-local/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": ["./index.ts"]
}
20 changes: 0 additions & 20 deletions .eslintplugin/tsconfig.json

This file was deleted.

3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"tsdoc/syntax": "off",
"typescript-sort-keys/interface": "off",
"typescript-sort-keys/string-enum": "off",
"unicorn/prefer-math-trunc": "off"
"unicorn/prefer-math-trunc": "off",
"jsdoc/no-undefined-types": "off"
}
}
26 changes: 13 additions & 13 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
6 changes: 3 additions & 3 deletions .github/COMMIT_CONVENTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp

The subject contains a succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Expand Down
44 changes: 22 additions & 22 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@

**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue, or on [GitHub Discussions](https://github.com/discordjs/discord-api-types/discussions) – you will get redirected there anyway.**

- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
- [Contributing Tests](#contributing-tests)
- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
- [Contributing Tests](#contributing-tests)

## Pull Request Guidelines

- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.

- If adding a new feature:
- If adding a new feature:

- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.

- If fixing a bug:
- If fixing a bug:

- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.
- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.

```
fix(Guild): handle events correctly
```
fix(Guild): handle events correctly
close #28
```
close #28
```
- Provide a detailed description of the bug in the PR. Live demo preferred.
- Provide a detailed description of the bug in the PR. Live demo preferred.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Make sure tests pass!
- Make sure tests pass!
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
## Development Setup
Expand All @@ -48,6 +48,6 @@ $ npm i # install the dependencies of the project

A high level overview of tools used:

- [TypeScript](https://www.typescriptlang.org/) as the development language
- [ESLint](https://eslint.org/) for code-style
- [Prettier](https://prettier.io/) for code formatting
- [TypeScript](https://www.typescriptlang.org/) as the development language
- [ESLint](https://eslint.org/) for code-style
- [Prettier](https://prettier.io/) for code formatting
87 changes: 56 additions & 31 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,83 @@
chore:
- any: ['*']
all:
[
'!deno/**/*',
'!gateway/**/*',
'!payloads/**/*',
'!rest/**/*',
'!rpc/**/*',
'!tests/**/*',
'!utils/**/*',
'!voice/**/*',
]
- changed-files:
- all-globs-to-any-file:
- '*'
- '!deno/**/*'
- '!gateway/**/*'
- '!payloads/**/*'
- '!rest/**/*'
- '!rpc/**/*'
- '!tests/**/*'
- '!utils/**/*'
- '!voice/**/*'

ci:
- .github/**/*
- .husky/**/*
- scripts/actions/**/*
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- .husky/**/*
- scripts/actions/**/*

dependencies:
- package.json
- package-lock.json
- website/package.json
- website/package-lock.json
- changed-files:
- any-glob-to-any-file:
- package.json
- package-lock.json
- website/package.json
- website/package-lock.json

'topic:deno':
- scripts/deno.mjs
- scripts/actions/report-deno-not-ran.mjs
- changed-files:
- any-glob-to-any-file:
- scripts/deno.mjs
- scripts/actions/report-deno-not-ran.mjs

'topic:gateway':
- gateway/**/*
- changed-files:
- any-glob-to-any-file:
- gateway/**/*

'topic:payloads':
- payloads/**/*
- changed-files:
- any-glob-to-any-file:
- payloads/**/*

'topic:rest':
- rest/**/*
- changed-files:
- any-glob-to-any-file:
- rest/**/*

'topic:rpc':
- rpc/**/*
- changed-files:
- any-glob-to-any-file:
- rpc/**/*

'topic:scripts':
- scripts/**/*
- changed-files:
- any-glob-to-any-file:
- scripts/**/*

'topic:tests':
- tests/**/*
- changed-files:
- any-glob-to-any-file:
- tests/**/*

'topic:utils':
- utils/**/*
- changed-files:
- any-glob-to-any-file:
- utils/**/*

'topic:voice':
- voice/**/*
- changed-files:
- any-glob-to-any-file:
- voice/**/*

'topic:globals':
- globals.ts
- changed-files:
- any-glob-to-any-file:
- globals.ts

'topic:website':
- website/**/*
- changed-files:
- any-glob-to-any-file:
- website/**/*
8 changes: 4 additions & 4 deletions .github/workflows/check-deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install Dependencies
run: npm ci
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"

- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org/

Expand All @@ -42,12 +42,12 @@ jobs:

steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install Dependencies
run: npm ci
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/create-pr-for-release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node v16
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
Expand Down Expand Up @@ -65,18 +65,22 @@ jobs:
create_release:
name: Create release and publish
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node v16
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labelsync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Label sync
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit a8b45c2

Please sign in to comment.