From 4a3cfee3d02a30c0dd2cdee0a87be730045758f9 Mon Sep 17 00:00:00 2001 From: lozy360 Date: Thu, 17 Sep 2026 14:36:50 +0200 Subject: [PATCH] Replace peter-evans/create-pull-request (GitHub-only API) with a direct Gitea API call --- .gitea/workflows/minor_patch_diff.yml | 34 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/minor_patch_diff.yml b/.gitea/workflows/minor_patch_diff.yml index 39d1a1c..9f370ed 100644 --- a/.gitea/workflows/minor_patch_diff.yml +++ b/.gitea/workflows/minor_patch_diff.yml @@ -63,18 +63,24 @@ jobs: path: | diffs/${{ steps.versions.outputs.retail_new }}.diff.json - - name: Create Pull Request + - name: Commit and push update branch if: steps.versions.outputs.is_new == 'true' - uses: peter-evans/create-pull-request@v8 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})" - title: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})" - body: | - This automatic update contains the following changes: - - Updated `ffxiv_versions_global.json` - - Generated opcode diff for retail version ${{ steps.versions.outputs.retail_new }} - branch: "auto-update" - branch-suffix: "short-commit-hash" - base: "main" - delete-branch: true + id: commit + run: | + BRANCH="auto-update-${{ steps.versions.outputs.retail_new }}" + echo "branch=$BRANCH" >> "$GITHUB_OUTPUT" + git config user.name "gitea-actions" + git config user.email "actions@gitea.lozy.pink" + git checkout -b "$BRANCH" + git add -A + git commit -m "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})" + git push origin "$BRANCH" --force + + - name: Open Pull Request (Gitea API) + if: steps.versions.outputs.is_new == 'true' + run: | + curl -sf -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{"title":"Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})","head":"${{ steps.commit.outputs.branch }}","base":"main","body":"Automated opcode diff update for retail version ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.thaliak_version_new }})."}' \ + "https://gitea.lozy.pink/api/v1/repos/lozy360/opcodediff/pulls"