Skip to content

Commit

Permalink
Merge pull request #128 from modmail-dev/master
Browse files Browse the repository at this point in the history
[pull] master from kyb3r:master
  • Loading branch information
200percentmicky authored Feb 23, 2024
2 parents be14cca + 61336bc commit 76ec1d8
Show file tree
Hide file tree
Showing 32 changed files with 4,328 additions and 2,198 deletions.
414 changes: 230 additions & 184 deletions .bandit_baseline.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,15 @@ temp/
test.py

# Other stuff
.dockerignore
.env.example
.git/
.gitignore
.github/
app.json
CHANGELOG.md
Dockerfile
docker-compose.yml
Procfile
pyproject.toml
README.md
Expand Down
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TOKEN=MyBotToken
LOG_URL=https://logviewername.herokuapp.com/
GUILD_ID=1234567890
MODMAIL_GUILD_ID=1234567890
OWNERS=Owner1ID,Owner2ID,Owner3ID
CONNECTION_URI=mongodb+srv://mongodburi
16 changes: 13 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,19 @@ Pull requests are the best way to propose changes to the codebase. We actively w
## Any contributions you make will be under the GNU Affero General Public License v3.0
In short, when you submit code changes, your submissions are understood to be under the same [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using [Github Issues](https://github.com/kyb3r/modmail/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new Issue](https://github.com/kyb3r/modmail/issues/new); it's that easy!
## Report bugs using [Github Issues](https://github.com/modmail-dev/modmail/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new Issue](https://github.com/modmail-dev/modmail/issues/new); it's that easy!

## Find pre-existing issues to tackle
Check out our [unstaged issue tracker](https://github.com/modmail-dev/modmail/issues?q=is%3Aissue+is%3Aopen+-label%3Astaged) and start helping out!

Ways to help out:
- Help out new members
- Highlight invalid bugs/unsupported use cases
- Code review of pull requests
- Add on new use cases or reproduction steps
- Point out duplicate issues and guide them to the right direction
- Create a pull request to resolve the issue!

## Write bug reports with detail, background, and sample code
**Great Bug Reports** tend to have:
Expand All @@ -43,7 +54,6 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new Issue]
- What *actually* happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)


## Use a Consistent Coding Style
We use [black](https://github.com/python/black) for a unified code style.

Expand Down
4 changes: 2 additions & 2 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "1"
rules:
- base: master
upstream: kyb3r:master
upstream: modmail-dev:master
mergeMethod: hardreset
- base: development
upstream: kyb3r:development
upstream: modmail-dev:development
mergeMethod: hardreset
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: Create and publish a Docker image

on:
push:
branches: ['master']

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
26 changes: 13 additions & 13 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ on: [push, pull_request]

jobs:
code-style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']

# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macOS-latest]
# python-version: [3.6, 3.7]
name: Python ${{ matrix.python-version }} on ubuntu-latest

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv
pipenv install --dev --system
- name: Bandit syntax check
run: bandit -r . -b .bandit_baseline.json
# to refresh: bandit -f json -o .bandit_baseline.json -r .
# - name: Bandit syntax check
# run: bandit -r . -b .bandit_baseline.json
- name: Pylint
run: pylint ./bot.py cogs/*.py core/*.py --exit-zero -r y
continue-on-error: true
Expand Down
Loading

0 comments on commit 76ec1d8

Please sign in to comment.