Skip to content

Commit

Permalink
Merge branch 'master' into translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Legendaxe committed Jul 25, 2024
2 parents cb1588f + 5b53153 commit 7cb444e
Show file tree
Hide file tree
Showing 152 changed files with 6,017 additions and 5,916 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/wiki_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'PR Wiki Label'
on:
issue_comment:
types: [created]

jobs:
wiki-label:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && github.event.comment.body == '!wiki_label'
permissions:
issues: write
pull-requests: write
steps:
- name: Check commenter authorization
id: check-auth
run: |
IFS=',' read -ra WIKI_MANAGERS <<< "${{ vars.WIKI_MANAGERS }}"
COMMENTER_ID="${{ github.event.comment.user.id }}"
if [[ " ${WIKI_MANAGERS[@]} " =~ " ${COMMENTER_ID} " ]]; then
echo "authorized=true" >> $GITHUB_OUTPUT
else
echo "authorized=false" >> $GITHUB_OUTPUT
fi
- name: Add thumbs up reaction and Wiki label
if: steps.check-auth.outputs.authorized == 'true'
run: |
# Add thumbs up reaction
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions" \
-d '{"content":"+1"}'
# Add label to PR
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels" \
-d '["Requires Wiki Update"]'
- name: Unauthorized user thumbs down reaction
if: steps.check-auth.outputs.authorized == 'false'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions" \
-d '{"content":"-1"}'
2 changes: 1 addition & 1 deletion SQL/paradise_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ CREATE TABLE `connection_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`ckey` varchar(32) NOT NULL,
`ip` varchar(32) NOT NULL,
`ip` INT UNSIGNED NOT NULL,
`computerid` varchar(32) NOT NULL,
`server_id` VARCHAR(50) NULL DEFAULT NULL,
`result` ENUM('ESTABLISHED','DROPPED - IPINTEL','DROPPED - BANNED','DROPPED - INVALID') NOT NULL DEFAULT 'ESTABLISHED' COLLATE 'utf8mb4_general_ci',
Expand Down
17 changes: 17 additions & 0 deletions SQL/updates/57-58.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Updating DB from 57-58 ~Burza
# Changes the data type for the `ip` column in `connection_log` from VARCHAR to INT

# Creates a temporary column for our new data type
ALTER TABLE `connection_log`
ADD COLUMN `ip_int` INT UNSIGNED NULL;

# Copies the data from the `ip` column to `ip_int` as our new data type
UPDATE `connection_log`
SET `ip_int` = INET_ATON(`ip`);

# Deletes the old `ip` column from the table
ALTER TABLE `connection_log` DROP COLUMN `ip`;

# Updates the name of the temporary column to take place of the original
ALTER TABLE `connection_log`
CHANGE COLUMN `ip_int` `ip` INT UNSIGNED NOT NULL AFTER `ckey`;
Loading

0 comments on commit 7cb444e

Please sign in to comment.