forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
1,729 changed files
with
62,898 additions
and
71,533 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## Merger hooks, run tools/hooks/install.bat or install.sh to set up | ||
## Merge hooks, run tools/hooks/install.bat or install.sh to set up | ||
*.dmm text eol=lf merge=dmm | ||
*.dmi binary merge=dmi | ||
## TGUI bundle merge drivers | ||
*.bundle.* binary merge=tgui-merge-bundle | ||
*.chunk.* binary merge=tgui-merge-bundle |
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
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,24 @@ | ||
name: Label and close stale PRs and Issues | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at midnight UTC every day | ||
|
||
jobs: | ||
stale-prs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Seek and destroy stale PRs and Issues | ||
uses: actions/stale@v9 | ||
with: | ||
stale-pr-message: 'This pull request seems to be stale as there have been no changes in 14 days, please make changes within 7 days or the PR will be closed. If you believe this is a mistake, please inform a development team member on Discord.' | ||
close-pr-message: 'This pull request has not received any updates since being marked stale, and as such is now being automatically closed. Please feel free to re-open this pull request or open a new one once you have new updates.' | ||
stale-issue-message: 'This issue either requires verification or is unreproducible, but has had no updates for 60 days. Please provide an update within 14 days or this issue will be closed. If you believe this is a mistake, please contact an issue manager on Discord.' | ||
close-issue-message: 'This issue was marked as stale, yet no changes have been observed in the specified time. The issue has been closed.' | ||
days-before-stale: 14 | ||
days-before-issue-stale: 60 | ||
days-before-close: 7 | ||
days-before-issue-close: 14 | ||
exempt-issue-labels: '"Stale Exempt"' | ||
exempt-pr-labels: '"Stale Exempt", "-Status: Awaiting approval", "-Status: Awaiting Merge", "-Status: Awaiting type assignment"' | ||
any-of-issue-labels: '"Need Verification", "Cannot Reproduce", "Not A Bug", "(99% Sure) Not A Bug"' |
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,115 @@ | ||
name: Merge Upstream Master | ||
on: | ||
issue_comment: | ||
types: created | ||
|
||
jobs: | ||
merge-upstream: | ||
if: | | ||
github.event.issue.pull_request && | ||
(github.event.comment.body == '!merge_upstream') && | ||
((github.event.sender.id == github.event.issue.user.id) || | ||
(github.event.comment.author_association == 'COLLABORATOR') || | ||
(github.event.comment.author_association == 'MEMBER') || | ||
(github.event.comment.author_association == 'OWNER')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: create_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV" | ||
- run: echo "FAIL_NOTIFIED=false" >> "$GITHUB_ENV" | ||
|
||
- name: Like the comment | ||
run: | | ||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/ParadiseSS13/Paradise/issues/comments/${{ github.event.comment.id }}/reactions \ | ||
-f content='+1' | ||
- name: PR Data | ||
run: | | ||
pr_json=$(curl -L -s --fail-with-body -H "Authorization: token ${{ github.token }}" ${{ github.event.issue.pull_request.url }}) | ||
if [ `jq -r '.maintainer_can_modify' <<<$pr_json` == "false" ] ; then | ||
gh pr comment ${{ github.event.issue.html_url }} --body 'GitHub Actions can not push to the repository without "Allow edits and access to secrets by maintainers" checked.' | ||
echo "FAIL_NOTIFIED=true" >> "$GITHUB_ENV" | ||
exit 1 | ||
fi | ||
echo "PR_REPO=`jq -r '.head.repo.full_name' <<<$pr_json`" >> $GITHUB_ENV | ||
echo "PR_BRANCH=`jq -r '.head.ref' <<<$pr_json`" >> $GITHUB_ENV | ||
echo "PR_HEAD_LABEL=`jq -r '.head.label' <<<$pr_json`" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.PR_REPO }} | ||
ref: ${{ env.PR_BRANCH }} | ||
token: ${{ env.GH_TOKEN }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
cache-dependency-path: ./tgui/yarn.lock | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' | ||
|
||
- name: Perform Merge | ||
env: | ||
BASE_BRANCH: ${{ github.event.repository.default_branch }} | ||
BASE_REPOSITORY: ${{ github.repository }} | ||
run: | | ||
# Compare head branch and base branch | ||
compare_result=$(curl -L -s --fail-with-body \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/$BASE_REPOSITORY/compare/$BASE_BRANCH...$PR_HEAD_LABEL") | ||
# Assign multiple variables with one jq execution | ||
if IFS=$'\n' read -d '' -r behind_by ahead_by <<<$(jq '.behind_by, .ahead_by' <<<$compare_result) ; [ -z "$behind_by" ] || [ -z "$ahead_by" ] ; then | ||
echo '- Unable to determine the distance between the head branch and the base branch.' | tee -a "$GITHUB_STEP_SUMMARY" | ||
exit 1 | ||
fi | ||
if [ "$behind_by" -le 0 ] ; then | ||
echo '- Skipping merge. Up-to-date with base branch.' | tee -a "$GITHUB_STEP_SUMMARY" | ||
exit 0 | ||
else | ||
echo '- Merging base branch. Head branch is behind by '"$behind_by"' commits and ahead by '"$ahead_by"' commits.' | tee -a "$GITHUB_STEP_SUMMARY" | ||
fi | ||
# Install Tools | ||
chmod +x tools/bootstrap/python | ||
bash tools/hooks/install.sh | ||
bash tgui/bin/tgui --install-git-hooks | ||
chmod +x tools/hooks/*.merge tgui/bin/tgui | ||
# Actual Merge | ||
git config user.name paradisess13[bot] | ||
git config user.email "165046124+paradisess13[bot]@users.noreply.github.com" | ||
git remote add upstream "https://github.com/$BASE_REPOSITORY.git" | ||
git fetch origin "$PR_BRANCH" --depth=$((ahead_by + 1)) | ||
git fetch upstream "$BASE_BRANCH" --depth=$((behind_by + 1)) | ||
# Check if a workflow file would be modified by the merge (permissions prevent pushes if so) | ||
latest_workflow_commit=$(git log -n 1 --pretty=format:"%H" upstream/$BASE_BRANCH -- .github/workflows) | ||
if ! git branch --contains $latest_workflow_commit | grep -q "$(git rev-parse --abbrev-ref HEAD)"; then | ||
gh pr comment ${{ github.event.issue.html_url }} --body "GitHub Actions can not push to this branch as workflow files have been changed since your branch was last updated. Please update your branch past https://github.com/ParadiseSS13/Paradise/commit/$latest_workflow_commit before using this command again."# | ||
echo "FAIL_NOTIFIED=true" >> "$GITHUB_ENV" | ||
exit 1 | ||
fi | ||
git merge FETCH_HEAD | ||
git push origin | ||
- name: Notify Failure | ||
if: failure() && env.FAIL_NOTIFIED != 'true' | ||
run: | | ||
gh pr comment ${{ github.event.issue.html_url }} -b 'Merging upstream failed, see the action run log for details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' |
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 |
---|---|---|
|
@@ -9,19 +9,23 @@ on: | |
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
generate_maps: | ||
permissions: | ||
contents: write # for Git to git push | ||
pull-requests: write # for repo-sync/pull-request to create pull requests | ||
name: 'Generate NanoMaps' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- id: create_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV" | ||
|
||
- name: 'Update Branch' | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ steps.create_token.outputs.token }} | ||
|
||
- name: Branch | ||
run: | | ||
|
@@ -32,20 +36,11 @@ jobs: | |
- name: 'Generate Maps' | ||
run: './tools/github-actions/nanomap-renderer-invoker.sh' | ||
|
||
- name: 'Commit Maps' | ||
- name: 'Commit Maps and open PR' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "NanoMap Generation" | ||
git pull origin master | ||
git commit -m "NanoMap Auto-Update (`date`)" -a || true | ||
git push -f -u origin nanomap-render | ||
- name: Create Pull Request | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: "nanomap-render" | ||
destination_branch: "master" | ||
pr_title: "Automatic NanoMap Update" | ||
pr_body: "This pull request updates the server NanoMaps. Please review the diff images before merging." | ||
pr_label: "NanoMaps" | ||
pr_allow_empty: false | ||
gh pr create -t "Automatic NanoMap Update" -b "This pull request updates the server NanoMaps. Please review the diff images before merging." -l "NanoMaps" -H "nanomap-render" -B "master" |
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,18 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "byond", | ||
"request": "launch", | ||
"name": "Build & DS Debug", | ||
"preLaunchTask": "dm: build - ${command:CurrentDME}", | ||
"dmb": "${workspaceFolder}/${command:CurrentDMB}" | ||
}, | ||
{ | ||
"type": "byond", | ||
"request": "launch", | ||
"name": "DS Debug", | ||
"dmb": "${workspaceFolder}/${command:CurrentDMB}" | ||
} | ||
] | ||
} |
Oops, something went wrong.