From 8f0b8bd898d5713047e6050d3f3f2ae98fa81bec Mon Sep 17 00:00:00 2001 From: Kevin van Rijn Date: Sun, 8 Sep 2024 13:37:57 +0200 Subject: [PATCH] Initial commit --- .gitattributes | 3 ++ .github/dependabot.yml | 10 +++++++ .github/stale.yml | 15 ++++++++++ .github/workflows/automerge.yml | 24 +++++++++++++++ .github/workflows/lock.yml | 18 ++++++++++++ .github/workflows/update.yml | 52 +++++++++++++++++++++++++++++++++ README.md | 18 ++++++++++++ 7 files changed, 140 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/dependabot.yml create mode 100644 .github/stale.yml create mode 100644 .github/workflows/automerge.yml create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/update.yml create mode 100644 README.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..3eabbe2eca --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=false +/.gitattributes export-ignore +/.github/ export-ignore diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..59dc08c6b0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: +- package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 + labels: + - dependencies + - automerge diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..48e1935ea2 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,15 @@ +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 14 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: false + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: [] + +# Label to use when marking as stale +staleLabel: stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: false diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000000..38631e92ed --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,24 @@ +name: "Dependabot Automerge" + +on: + pull_request: + branches: [ master ] + +permissions: write-all + +jobs: + automerge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: automerge + uses: actions/github-script@v7.0.1 + with: + script: | + github.rest.pulls.merge({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number, + sha: context.payload.pull_request.head.sha, + merge_method: 'merge' + }) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 0000000000..ba31c7e9e3 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,18 @@ +name: "Lock" + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5.0.1 + with: + add-issue-labels: 'locked' + remove-issue-labels: 'stale' + issue-lock-reason: '' + add-pr-labels: 'locked' + remove-pr-labels: 'stale' + pr-lock-reason: '' diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000000..02c3d0f31f --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,52 @@ +name: "Update" + +on: + push: + branches: [ main ] + schedule: + - cron: '*/5 * * * *' + +permissions: write-all + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.7 + with: + token: ${{ secrets.WORKFLOW_TOKEN }} + fetch-depth: 0 + - name: Update + shell: bash + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + # Configure git to be more predictable and deterministic + git config core.autocrlf false + git config core.ignorecase false + git config core.fscache true + git config core.longpaths true + git config diff.renameLimit 0 + git config status.renameLimit 0 + git config merge.renameLimit 0 + git config http.lowSpeedLimit 0 + git config http.lowSpeedTime 300 + git config http.postBuffer 1048576000 + git config pack.threads 1 + git config index.threads 0 + git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion.git + git fetch -f --all -t + git for-each-ref --shell --format='git branch -rd %(refname:lstrip=2)' --exclude=refs/remotes/RHH/master --exclude=refs/remotes/RHH/upcoming refs/remotes/RHH/ | bash --noprofile --norc -e -o pipefail + git for-each-ref --shell --format='git push -f -u origin %(refname):refs/heads/%(refname:lstrip=2)' --exclude=refs/remotes/origin/ refs/remotes/ | bash --noprofile --norc -e -o pipefail + git push -f --tags + git for-each-ref --shell --format='if git cat-file -e remotes/%(refname:lstrip=3)^{commit}; then echo Everything up-to-date; else git push -d origin refs/heads/%(refname:lstrip=3); fi' --exclude=refs/remotes/origin/main --exclude=refs/remotes/origin/master --exclude=refs/remotes/origin/upcoming refs/remotes/origin/ | bash --noprofile --norc -e -o pipefail + git checkout -b master refs/remotes/origin/master + git -c user.name="8" -c user.email="ElGHT@users.noreply.github.com" rebase refs/remotes/RHH/master + git push -f -u origin master:refs/heads/master + if [[ $(git cherry refs/remotes/origin/upcoming refs/remotes/RHH/upcoming | head -c1 | wc -c) -ne 0 || $(git cherry refs/remotes/RHH/upcoming | wc -l) -gt $(git cherry refs/remotes/RHH/upcoming refs/remotes/origin/upcoming | wc -l) ]]; then + git -c user.name="8" -c user.email="ElGHT@users.noreply.github.com" rebase refs/remotes/RHH/upcoming + git push -f -u origin master:refs/heads/upcoming + else + echo Current branch upcoming is up to date. + echo Everything up-to-date + fi diff --git a/README.md b/README.md new file mode 100644 index 0000000000..c47052699f --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# pokeemerald-expansion + +You're probably looking for: + +https://github.com/EIGHTFINITE/pokeemerald-expansion/tree/master +https://github.com/EIGHTFINITE/pokeemerald-expansion/blob/master/INSTALL.md +https://github.com/EIGHTFINITE/pokeemerald-expansion/blob/master/CHANGELOG.md + +Or if you want to start coding: + +``` +git init . +git remote add origin https://github.com/EIGHTFINITE/pokeemerald-expansion.git +git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion.git +git fetch --force --all --tags +git checkout -B master refs/remotes/origin/master + +```