-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
286 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,57 @@ | ||
name: Bug Report | ||
description: Report broken or incorrect behaviour | ||
labels: unconfirmed bug | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
Thanks for taking the time to fill out a bug report! Note that bugs that cannot be reproduced on the latest released version or development version will be closed. | ||
- type: input | ||
attributes: | ||
label: Summary | ||
description: A simple summary of your bug report | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Reproduction Steps | ||
description: > | ||
How did you make it happen? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Code | ||
description: > | ||
Relevant code that shows the bug. | ||
render: python | ||
- type: textarea | ||
attributes: | ||
label: Expected Results | ||
description: > | ||
What is supposed to happen? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Actual Results | ||
description: > | ||
What is actually happening? | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: Checklist | ||
description: > | ||
Let's make sure this issue is valid! | ||
options: | ||
- label: I have searched the open issues for duplicates. | ||
required: true | ||
- label: I have shared the entire traceback. | ||
required: true | ||
- label: I am using a user token (and it isn't visible in the code). | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional Information | ||
description: Put any extra context, weird configurations, or other important info here. |
This file contains 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,49 @@ | ||
name: Feature Request | ||
description: Suggest a feature for this library | ||
labels: feature request | ||
body: | ||
- type: input | ||
attributes: | ||
label: Summary | ||
description: > | ||
A short summary of what your feature request is. | ||
validations: | ||
required: true | ||
- type: dropdown | ||
attributes: | ||
multiple: false | ||
label: What is the feature request for? | ||
options: | ||
- The core library | ||
- discord.ext.commands | ||
- discord.ext.tasks | ||
- The documentation | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: The Problem | ||
description: > | ||
What problem is your feature trying to solve? | ||
What becomes easier or possible when this feature is implemented? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: The Ideal Solution | ||
description: > | ||
What is your ideal solution to the problem? | ||
What would you like this feature to do? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: The Current Solution | ||
description: > | ||
What is the current solution to the problem, if any? | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Additional Context | ||
description: If there is anything else to say, please do so here. |
This file contains 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,12 @@ | ||
## Summary | ||
<!-- What is this pull request for? Does it fix any issues? --> | ||
|
||
## General Info | ||
<!-- Put an x inside [ ] to check it, like so: [x] --> | ||
|
||
- [ ] If code changes were made then they have been tested. | ||
- [ ] I have updated the documentation to reflect the changes. | ||
- [ ] This PR fixes an issue (please put issue # in summary). | ||
- [ ] This PR adds something new (e.g. new method or parameters). | ||
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed) | ||
- [ ] This PR is **not** a code change (e.g. documentation, README, ...) |
This file contains 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,55 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
|
||
jobs: | ||
dists-and-docs: | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up CPython 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install -U -r requirements.txt | ||
- name: Build distributions | ||
run: | | ||
python ./setup.py sdist bdist_wheel | ||
# - name: Upload artifacts | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: distributions | ||
# path: dist/* | ||
|
||
- name: Install package | ||
run: | | ||
pip install -e .[docs,speed,voice] | ||
- name: Build docs | ||
shell: bash | ||
run: | | ||
cd docs | ||
sphinx-build -b html -D language=en -j auto -a -n -T -W --keep-going . _build/html | ||
env: | ||
DOCS_LANGUAGE: en | ||
|
||
# - name: Upload docs | ||
# uses: actions/upload-artifact@v2 | ||
# if: always() | ||
# with: | ||
# name: docs-en | ||
# path: docs/_build/html/* |
This file contains 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,44 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up CPython 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
id: install-deps | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel black==22.6 requests | ||
pip install -U -r requirements.txt | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Run Pyright | ||
uses: jakebailey/pyright-action@v1 | ||
with: | ||
version: '1.1.316' | ||
warnings: false | ||
no-comments: false | ||
|
||
- name: Run black | ||
if: ${{ always() && steps.install-deps.outcome == 'success' }} | ||
run: | | ||
black --check discord examples |
This file contains 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,30 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up CPython 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains 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,39 @@ | ||
name: Rename | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
rename: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Replace instances | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
git checkout -b temp master | ||
cp .github/files/README.rst README.rst | ||
rm -rf docs .github .readthedocs.yml tests | ||
mv discord selfcord | ||
sed -i -e 's/import discord/import selfcord/g' -e '/from discord_protos/!{s/from discord/from selfcord/g}' -e '/from discord_protos/!{s/from discord/from selfcord/g}' -e 's/discord\.py-self/selfcord\.py/g' -e '/\(discord\.com\|discord\.gg\|discord\.new\)/! s/discord\./selfcord\./g' $(find selfcord examples -name "*.py") | ||
sed -i -e 's/discord/selfcord/g' pyproject.toml MANIFEST.in | ||
sed -i -e "s/prefix = 'discord'/prefix = 'selfcord'/" setup.py | ||
- name: Push changes | ||
run: | | ||
git add . | ||
git stash | ||
git switch renamed | ||
git checkout stash -- . | ||
(git commit -am "Synchronize selfcord") || true | ||
(git push origin renamed) || true |