Skip to content

Commit a899521

Browse files
Merge branch 'main' into vgs-main
2 parents cd834b4 + 6b27c5c commit a899521

52 files changed

Lines changed: 1512 additions & 941 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# dotenv-linter:off ValueWithoutQuotes
2+
13
# !!REQUIRED!!
24
# The Discord token for the bot you created (available on your bot page in the developer portal: https://discord.com/developers/applications))
35
# Must be a valid Discord bot token (see https://discord.com/developers/docs/topics/oauth2#bot-vs-user-accounts)
@@ -34,12 +36,10 @@ MEMBERSHIP_PERKS_URL=[Replace with your group\'s membership-perks URL]
3436
# Must be a valid URL
3537
CUSTOM_DISCORD_INVITE_URL=[Replace with your group\'s Discord server invite link]
3638

37-
3839
# The minimum level that logs must meet in order to be logged to the console output stream
3940
# One of: DEBUG, INFO, WARNING, ERROR, CRITICAL
4041
CONSOLE_LOG_LEVEL=INFO
4142

42-
4343
# !!REQUIRED!!
4444
# The URL to retrieve the list of IDs of people that have purchased a membership to your community group
4545
# Ensure that all members are visible without pagination. For example, if your members-list is found on the UoB Guild of Students website, ensure the URL includes the "sort by groups" option
@@ -52,17 +52,14 @@ ORGANISATION_ID=[Replace with your group\'s MSL Organisation ID]
5252
# This can be extracted from your web-browser, after logging in to view your members-list yourself. It will probably be listed as a cookie named `.AspNet.SharedCookie`
5353
SU_PLATFORM_ACCESS_COOKIE=[Replace with your .AspNet.SharedCookie cookie]
5454

55-
5655
# The probability that the more rare ping command response will be sent instead of the normal one
5756
# Must be a float between & including 0 to 1
5857
PING_COMMAND_EASTER_EGG_PROBABILITY=0.01
5958

60-
6159
# The path to the messages JSON file that contains the common messages sent by the bot
6260
# Must be a path to a JSON file that exists, that contains a JSON string that can be decoded into a Python dict object
6361
MESSAGES_FILE_PATH=messages.json
6462

65-
6663
# Whether introduction reminders will be sent to Discord members that are not inducted, saying that they need to send an introduction to be allowed access
6764
# One of: Once, Interval, False
6865
SEND_INTRODUCTION_REMINDERS=Once
@@ -94,7 +91,6 @@ SEND_GET_ROLES_REMINDERS_DELAY=40h
9491
# Must be a string of the seconds, minutes or hours between reminders (format: "<seconds>s<minutes>m<hours>h")
9592
ADVANCED_SEND_GET_ROLES_REMINDERS_INTERVAL=24h
9693

97-
9894
# The number of days to look over messages sent, to generate statistics data
9995
# Must be a float representing the number of days to look back through
10096
STATISTICS_DAYS=30
@@ -103,20 +99,17 @@ STATISTICS_DAYS=30
10399
# Must be a comma seperated list of strings of role names
104100
STATISTICS_ROLES=Committee,Committee-Elect,Student Rep,Member,Guest,Server Booster,Foundation Year,First Year,Second Year,Final Year,Year In Industry,Year Abroad,PGT,PGR,Alumnus/Alumna,Postdoc,Quiz Victor
105101

106-
107102
# !!REQUIRED!!
108103
# The URL of the your group's Discord guild moderation document
109104
# Must be a valid URL
110105
MODERATION_DOCUMENT_URL=[Replace with your group\'s moderation document URL]
111106

112-
113107
# The name of the channel, that warning messages will be sent to when a committee-member manually applies a moderation action (instead of using the `/strike` command)
114108
# Must be the name of a Discord channel in your group's Discord guild, or the value "DM" (which indicates that the messages will be sent in the committee-member's DMs)
115109
# This can be the name of ANY Discord channel (so the offending person *will* be able to see these messages if a public channel is chosen)
116110
MANUAL_MODERATION_WARNING_MESSAGE_LOCATION=DM
117111

118-
119112
# The set of roles that are tied to the membership of your community group
120113
# These roles will be removed along with the membership role upon annual handover/reset
121114
# Must be a comma seperated list of strings of role names
122-
MEMBERSHIP_DEPENDENT_ROLES=member-red,member-blue,member-green,member-yellow,member-purple,member-pink,member-orange,member-grey,member-black,member-white
115+
MEMBERSHIP_DEPENDENT_ROLES=member-red,member-blue,member-green,member-yellow,member-purple,member-pink,member-orange,member-grey,member-black,member-white

.github/renovate.json

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"assignAutomerge": true,
3+
"assignAutomerge": false,
4+
"automerge": true,
45
"configMigration": true,
56
"dependencyDashboard": true,
67
"dependencyDashboardAutoclose": true,
78
"dependencyDashboardLabels": [
8-
"dependencies",
9-
"tracker"
9+
"dependencies"
1010
],
1111
"enabled": true,
1212
"enabledManagers": [
@@ -20,18 +20,42 @@
2020
"replacements:all",
2121
"workarounds:all"
2222
],
23+
"gitIgnoredAuthors": [
24+
"autofix-ci@users.noreply.github.com",
25+
"autofix-ci[bot]@users.noreply.github.com",
26+
"114827586+autofix-ci[bot]@users.noreply.github.com"
27+
],
2328
"labels": [
2429
"dependencies"
2530
],
2631
"lockFileMaintenance": {
32+
"automerge": true,
2733
"enabled": true
2834
},
2935
"packageRules": [
3036
{
31-
"description": "Only update major Python versions manually",
32-
"enabled": false,
37+
"dependencyDashboardApproval": true,
38+
"description": "Only update Python versions after approval",
39+
"groupName": "python-version",
3340
"matchPackageNames": [
3441
"python"
42+
],
43+
"matchUpdateTypes": [
44+
"major",
45+
"minor"
46+
]
47+
},
48+
{
49+
"dependencyDashboardApproval": true,
50+
"description": "Only update py-cord versions after approval",
51+
"groupName": "py-cord-version",
52+
"matchPackageNames": [
53+
"py-cord"
54+
],
55+
"matchUpdateTypes": [
56+
"major",
57+
"minor",
58+
"patch"
3559
]
3660
},
3761
{
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: autofix.ci
2+
3+
"on":
4+
pull_request:
5+
branches: [main]
6+
workflow_call:
7+
inputs:
8+
skip-autofix:
9+
default: false
10+
required: false
11+
type: boolean
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
autofix-pre-commit:
18+
env:
19+
UV_FROZEN: true
20+
UV_NO_SYNC: true
21+
UV_PYTHON_DOWNLOADS: never
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v6
26+
27+
- name: Add GB Locale
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y locales
31+
sudo locale-gen en_GB.UTF-8
32+
shell: bash
33+
34+
- name: Set Up Python
35+
uses: actions/setup-python@v6
36+
with:
37+
python-version-file: .python-version
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v8.1.0
41+
with:
42+
enable-cache: true
43+
44+
- name: Install prek From Locked Dependencies
45+
run: uv sync --only-group pre-commit
46+
47+
- id: store-hashed-python-version
48+
name: Store Hashed Python Version
49+
run: echo "hashed_python_version=$(uv run -- python -VV | sha256sum | cut -d' ' -f1)"
50+
>> "$GITHUB_OUTPUT"
51+
52+
- uses: actions/cache@v5
53+
with:
54+
key: prek|${{steps.store-hashed-python-version.outputs.hashed_python_version}}|${{hashFiles('.pre-commit-config.yaml')}}
55+
path: ~/.cache/prek
56+
57+
- name: Setup pre-commit Environments
58+
run: uv run -- prek install-hooks
59+
60+
- name: Run prek
61+
run: |
62+
set -o pipefail
63+
if [[ "${{github.event_name}}" == "push" && "${{github.ref_name}}" == "${{github.event.repository.default_branch}}" ]]; then
64+
uv run -- prek run --all-files --hook-stage manual --color never --skip ruff-check --skip uv-lock --skip gitlint-ci | tee /tmp/prek.log
65+
else
66+
uv run -- prek run --all-files --hook-stage manual --color never --skip ruff-check --skip uv-lock | tee /tmp/prek.log
67+
fi
68+
69+
- name: Ensure No Warnings
70+
run: "if grep -q '^warning: ' /tmp/prek.log; then exit 1; fi"
71+
72+
- if: "!cancelled() && inputs.skip-autofix != true"
73+
uses: autofix-ci/action@v1.3.4

0 commit comments

Comments
 (0)