Skip to content

Commit

Permalink
Merge pull request #88 from ppfeufer/development
Browse files Browse the repository at this point in the history
[RELEASE] v2.17.0
  • Loading branch information
ppfeufer authored Dec 6, 2022
2 parents 4d8f27d + 8215ab1 commit 634b8c1
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 89 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/automated-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:

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

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Run Pre Commit Checks
uses: pre-commit/[email protected]
Expand All @@ -40,11 +42,11 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@main

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@1.1.0
uses: codacy/codacy-analysis-cli-action@master
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand All @@ -60,7 +62,7 @@ jobs:

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: results.sarif

Expand All @@ -78,7 +80,7 @@ jobs:
- '3.8'
- '3.9'
- '3.10'
- '3.11-dev'
- '3.11'
# Don't forget to change the Django version for [upload-coverage] as well
django-version:
- '4.0'
Expand All @@ -94,7 +96,7 @@ jobs:
- mariadb:10.8
- mariadb:10.9

continue-on-error: ${{ matrix.python-version == '3.11-dev' }}
# continue-on-error: ${{ matrix.python-version == '3.11-dev' }}

services:
database:
Expand All @@ -108,7 +110,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@main

- name: Install redis
run: sudo apt-get install -y redis-tools redis-server
Expand All @@ -117,7 +119,7 @@ jobs:
run: redis-cli ping

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -138,7 +140,7 @@ jobs:

- name: Upload Coverage Artifacts
if: ${{ github.event_name == 'pull_request' && matrix.python-version == '3.10' && matrix.django-version == '4.0' }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: coverage-${{ github.event_name }}-${{ github.sha }}
path: coverage.xml
Expand All @@ -157,7 +159,7 @@ jobs:
# - '3.8'
# - '3.9'
# - '3.10'
# - '3.11-dev'
# - '3.11'
# # Django versions
# django-version:
# - '4.0'
Expand All @@ -173,7 +175,7 @@ jobs:
# - mariadb:10.8
# - mariadb:10.9
#
# continue-on-error: ${{ matrix.python-version == '3.11-dev' }}
# continue-on-error: ${{ matrix.python-version == '3.11' }}
#
# services:
# database:
Expand All @@ -187,7 +189,7 @@ jobs:
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# uses: actions/checkout@main
#
# - name: Install redis
# run: sudo apt-get install -y redis-tools redis-server
Expand All @@ -196,7 +198,7 @@ jobs:
# run: redis-cli ping
#
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
Expand Down Expand Up @@ -225,10 +227,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@main

- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: artifacts

Expand All @@ -237,7 +239,7 @@ jobs:
working-directory: artifacts

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: artifacts/coverage-${{ github.event_name }}-${{ github.sha }}/coverage.xml # optional
Expand All @@ -261,11 +263,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@main

# Minimum supported Python version by AllianceAuth
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -282,7 +284,7 @@ jobs:
python -m build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-${{ github.event_name }}-${{ github.sha }}
path: dist
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-json
Expand Down Expand Up @@ -40,7 +40,7 @@ repos:
- id: check-merge-conflict

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.6.1
rev: 2.6.2
hooks:
- id: editorconfig-checker
exclude: |
Expand All @@ -57,19 +57,19 @@ repos:
- id: text-unicode-replacement-char

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.10.0
rev: 1.12.0
hooks:
- id: django-upgrade
args: [ --target-version=4.0 ]

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.0
rev: v3.3.0
hooks:
- id: pyupgrade
args: [ --py38-plus ]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8

Expand All @@ -84,7 +84,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.10.0
hooks:
- id: black
args: [ --target-version=py38 ]
Expand All @@ -93,10 +93,10 @@ repos:
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [ black==22.8.0 ]
additional_dependencies: [ black==22.10.0 ]
args: [ --target-version=py38 ]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
rev: v2.2.0
hooks:
- id: setup-cfg-fmt
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Explorer 11 or older, you should feel bad and update to a modern browser)


## [2.17.0] - 2022-12-06

### Added

- `AA_FLEETPINGS_WEBHOOK_VERIFICATION` setting to disable webhook URL verification
so you can use non-Discord webhooks for your pings. If you do so, it is up to you
to ensure your webhook understands a payload formatted for Discord webhooks.
(Thanks to [@pvyParts])


## [2.16.0] - 2022-09-18

### Added
Expand Down Expand Up @@ -577,3 +587,7 @@ backend, since we just nuked them from the old app.
### Added

- initial version


<!-- URLs -->
[@pvyParts]: https://github.com/pvyParts "Aaron"
59 changes: 41 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,13 @@ Discord.
### ⚠️ Important ⚠️

This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already,
please install it first before proceeding.
(see the official
[AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html)
please install it first before proceeding. (see the official [AA installation guide]
for details)

**⚠️ You also want to make sure that you have the
[Discord service](https://allianceauth.readthedocs.io/en/latest/features/services/discord.html)
installed, configured and activated before installing this app. ⚠️**
**⚠️ You also want to make sure that you have the [Discord service] installed,
configured and activated before installing this app. ⚠️**

### Step 1 - Install the app
### Step 1 - Install the App

Make sure you are in the virtual environment (venv) of your Alliance Auth installation.
Then install the latest version:
Expand All @@ -51,14 +48,14 @@ Then install the latest version:
pip install aa-fleetpings
```

### Step 2 - Update your AA settings
### Step 2 - Update Your AA Settings

Configure your AA settings (`local.py`) as follows:

- Add `'fleetpings',` to `INSTALLED_APPS`


### Step 3 - Finalize the installation
### Step 3 - Finalize the Installation

Copy static files and run migrations

Expand All @@ -69,13 +66,13 @@ python manage.py migrate

Restart your supervisor services for AA

### Step 4 - Setup permission
### Step 4 - Setup Permission

Now you can setup permissions in Alliance Auth for your users.
Now you can set up permissions in Alliance Auth for your users.
Add ``fleetpings | aa fleetpings | Can access this app`` to the states and/or
groups you would like to have access.

### Step 5 - Setup the app
### Step 5 - Setup the App

In your admin backend you'll find a new section called `Fleet Pings`.
This is where you set all your stuff up, like the webhooks you want to ping and who
Expand All @@ -98,7 +95,7 @@ python manage.py collectstatic
python manage.py migrate
```

Finally restart your AA supervisor services.
Finally, restart your AA supervisor services.


## Screenshots
Expand All @@ -114,16 +111,42 @@ Finally restart your AA supervisor services.

## Configuration

### Use Doctrines from Fittings module
The following settings can be made in your `local.py`:

If you have the [Fittings and Doctrines](https://gitlab.com/colcrunch/fittings)
module installed, and your doctrines configured there, you don't have to re-build
your doctrine list for this module. You can simply use the doctrines you already
have configured in the Fittings and Doctrines module.
| Setting | Description | Default |
|:---------------------------------------------------|:-----------------------------------------------------------------------------------------|:--------|
| `AA_FLEETPINGS_USE_DOCTRINES_FROM_FITTINGS_MODULE` | Enables integration with the [Fittings and Doctrines] module for doctrine suggestion. | `False` |
| `AA_FLEETPINGS_WEBHOOK_VERIFICATION` | Enables or disables verification of webhook URLs to see if it's a valid Discord webhook | `True` |


### Use Doctrines From Fittings Module

If you have the [Fittings and Doctrines] module installed, and your doctrines
configured there, you don't have to re-build your doctrine list for this module. You
can simply use the doctrines you already have configured in the Fittings and
Doctrines module.

To do so, add the following to your `local.py`:

```python
## AA Fleet Pings
AA_FLEETPINGS_USE_DOCTRINES_FROM_FITTINGS_MODULE = True
```

### Allow Non Discord Webhooks

If you require your pings to be sent to a webhook that is not a standard discord
webhook, add the following to your `local.py`:

```python
## AA Fleet Pings
AA_FLEETPINGS_WEBHOOK_VERIFICATION = False
```

When disabling webhook verification and using non Discord webhooks, it is up to you
to make sure your webhook understands a payload that is formatted for Discord webhooks.

<!-- URLs -->
[Fittings and Doctrines]: https://gitlab.com/colcrunch/fittings "Fittings and Doctrines"
[Discord service]: https://allianceauth.readthedocs.io/en/latest/features/services/discord.html "Discord service"
[AA installation guide]: https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html "AA installation guide"
2 changes: 1 addition & 1 deletion fleetpings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
A couple of variables to use throughout the app
"""

__version__ = "2.16.0"
__version__ = "2.17.0"
__title__ = "Fleet Pings"
Loading

0 comments on commit 634b8c1

Please sign in to comment.