forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into translate
- Loading branch information
Showing
152 changed files
with
6,017 additions
and
5,916 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`; |
Oops, something went wrong.