Skip to content

Commit

Permalink
Merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Aug 6, 2021
2 parents 8d6cdab + c5eb0dd commit e579568
Show file tree
Hide file tree
Showing 33 changed files with 939 additions and 1,430 deletions.
12 changes: 3 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,11 @@ test.py
# Other stuff
.env.example
.gitignore
.lint.py
.pylintrc
.travis.yml
.github/
app.json
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
requirements.min.txt
Procfile
pyproject.toml
README.md
runtime.txt
SPONSORS.json
stack.yml
Pipfile
Pipfile.lock
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Bug Report
description: File a bug report
title: "[BUG]: your bug report title"
labels: "maybe: bug"
body:
- type: input
id: bot-info-version
attributes:
label: Bot Version
description: Check it with `@modmail about`
placeholder: eg. v3.9.4
validations:
required: true
- type: dropdown
id: bot-info-hosting
attributes:
label: How are you hosting Modmail?
description: You can check it with `@modmail about` if you are unsure
options:
- Heroku
- Systemd
- PM2
- Patreon
- Other
validations:
required: true
- type: input
id: logs
attributes:
label: Error Logs
placeholder: https://hastebin.cc/placeholder
description:
"If your Modmail bot is online, type `@modmail debug hastebin` and include the link here.
If your Modmail bot is not online or the previous command did not generate a link, do the following:
1. Select your *bot* application at https://dashboard.heroku.com
2. [Restart your bot](https://i.imgur.com/3FcrlKz.png)
3. Reproduce the error to populate the error logs
4. [Copy and paste the logs](https://i.imgur.com/TTrhitm.png)"
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: "[optional] You may add screenshots to further explain your problem."
- type: textarea
id: additional-info
attributes:
label: Additional Information
description: "[optional] You may provide additional context for us to better understand how this issue occured."
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/command-request.md

This file was deleted.

5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discord Server
url: https://discord.gg/etJNHCQ
about: Please ask hosting-related questions here before creating an issue.
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Feature Request
description: Suggest an idea for this project
title: "your feature request title"
labels: "feature request"
body:
- type: textarea
id: problem-relation
attributes:
label: Is your feature request related to a problem? Please elaborate.
description: A clear and concise description of what the problem is.
placeholder: eg. I'm always frustrated when...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: checkboxes
id: complications
attributes:
label: Does your solution involve any of the following?
options:
- label: Logviewer
- label: New config option
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
id: benefit
attributes:
label: Who will this benefit?
description: Does this feature apply to a great portion of users?
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional Information
description: "[optional] You may provide additional context or screenshots for us to better understand the need of the feature."
15 changes: 7 additions & 8 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install bandit==1.6.2 pylint black==19.10b0
continue-on-error: true
python -m pip install --upgrade pip pipenv
pipenv install --dev --system
- name: Bandit syntax check
run: bandit -r . -b .bandit_baseline.json
- name: Pylint
run: pylint ./bot.py cogs/*.py core/*.py --disable=import-error --exit-zero -r y
run: pylint ./bot.py cogs/*.py core/*.py --exit-zero -r y
continue-on-error: true
- name: Black
run: |
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ however, insignificant breaking changes do not guarantee a major version bump, s
- Certain situations where the internal thread cache breaks and spams new channels. ([GH #3022](https://github.com/kyb3r/modmail/issues/3022), [PR #3028](https://github.com/kyb3r/modmail/pull/3028))
- Blocked users are now no longer allowed to use `?contact` and react to contact. ([COMMENT #819004157](https://github.com/kyb3r/modmail/issues/2969#issuecomment-819004157), [PR #3027](https://github.com/kyb3r/modmail/pull/3027))

# v3.9.5

## Internal

- Bumped discord.py to v1.7.3, updated all other packages to latest.
- More debug log files are now kept.
- Resolve SSL errors by retrying without SSL

# v3.9.4

## Fixed
Expand Down
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM python:3.7-alpine
FROM python:3.9-slim as py

FROM py as build

RUN apt update && apt install -y g++
COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt

FROM py

ENV USING_DOCKER yes
COPY --from=build /inst /usr/local

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY . /modmailbot
RUN export PIP_NO_CACHE_DIR=false \
&& apk update \
&& apk add --update --no-cache --virtual .build-deps alpine-sdk \
&& pip install pipenv \
&& pipenv install --deploy --ignore-pipfile \
&& apk del .build-deps
CMD ["pipenv", "run", "bot"]
40 changes: 18 additions & 22 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@ name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
black = "==19.10b0"
pylint = "*"
bandit = "==1.6.2"
flake8 = "*"
bandit = "~=1.7.0"
black = "==21.6b0"
pylint = "~=2.9.3"

[packages]
colorama = ">=0.4.0"
python-dateutil = ">=2.7.0"
emoji = ">=0.2"
uvloop = {version = ">=0.12.0",sys_platform = "!= 'win32'"}
motor = ">=2.0.0"
natural = "==0.2.0"
isodate = ">=0.6.0"
dnspython = "~=1.16.0"
parsedatetime = "==2.6"
aiohttp = ">=3.6.0,<3.7.0"
python-dotenv = ">=0.10.3"
pipenv = "*"
"discord.py" = "==1.6.0"
aiohttp = "==3.7.4.post0"
colorama = "~=0.4.4" # Doesn't officially support Python 3.9 yet, v0.4.5 will support 3.9
"discord.py" = "==1.7.3"
emoji = "~=1.2.0"
isodate = "~=0.6.0"
motor = "~=2.4.0"
natural = "~=0.2.0"
parsedatetime = "~=2.6"
pymongo = {extras = ["srv"], version = "*"} # Required by motor
python-dateutil = "~=2.8.1"
python-dotenv = "~=0.18.0"
uvloop = {version = ">=0.15.2", markers = "sys_platform != 'win32'"}

[scripts]
bot = "python bot.py"

[requires]
python_version = "3.9"
Loading

0 comments on commit e579568

Please sign in to comment.