From a21fefd3ae1fbfbf230b3e0ac12ee9e962079708 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 15:39:41 +0000 Subject: [PATCH 1/3] Changes generated by 4b494d6260d4e3ba37fdddfdf16a8f358599690b This commit was automatically created from gocardless/client-library-templates@4b494d6260d4e3ba37fdddfdf16a8f358599690b by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/31507933362 --- src/main/java/com/gocardless/resources/Payment.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/gocardless/resources/Payment.java b/src/main/java/com/gocardless/resources/Payment.java index 6979116c..16975428 100644 --- a/src/main/java/com/gocardless/resources/Payment.java +++ b/src/main/java/com/gocardless/resources/Payment.java @@ -24,6 +24,7 @@ private Payment() { private Integer amount; private Integer amountRefunded; + private Integer appFee; private String chargeDate; private String createdAt; private Currency currency; @@ -61,6 +62,16 @@ public Integer getAmountRefunded() { return amountRefunded; } + /** + * The amount to be deducted from the payment as the OAuth app''s fee, in the lowest + * denomination for the currency (e.g. pence in GBP, cents in EUR). + * + * Only present if the payment was created via an app. + */ + public Integer getAppFee() { + return appFee; + } + /** * A future date on which the payment should be collected. If not specified, the payment will be * collected as soon as possible. If the value is before the Date: Tue, 11 Aug 2026 17:56:35 +0100 Subject: [PATCH 2/3] Explicitly set release title so it matches the tag name --- .github/workflows/auto-release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 3a94cb2c..c520ec3f 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -57,13 +57,14 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git tag v${{ steps.version.outputs.version }} - git push origin v${{ steps.version.outputs.version }} + TAG="v${{ steps.version.outputs.version }}" + git tag "$TAG" + git push origin "$TAG" NOTES="${{ steps.notes.outputs.notes }}" if [ -n "$(echo "$NOTES" | tr -d '[:space:]')" ]; then - gh release create v${{ steps.version.outputs.version }} --notes "$NOTES" + gh release create "$TAG" --title "$TAG" --notes "$NOTES" else - gh release create v${{ steps.version.outputs.version }} --generate-notes + gh release create "$TAG" --title "$TAG" --generate-notes fi env: GITHUB_TOKEN: ${{ secrets.GOCARDLESS_CI_ROBOT_TOKEN }} From d135163c8b59b3d9d97248e663c8b052f407ee56 Mon Sep 17 00:00:00 2001 From: jamiecobbett Date: Tue, 11 Aug 2026 18:00:06 +0100 Subject: [PATCH 3/3] Auto merge template-changes PRs --- .../auto-merge-client-library-changes.yml | 67 +++---------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/.github/workflows/auto-merge-client-library-changes.yml b/.github/workflows/auto-merge-client-library-changes.yml index d548aec4..004a0b84 100644 --- a/.github/workflows/auto-merge-client-library-changes.yml +++ b/.github/workflows/auto-merge-client-library-changes.yml @@ -1,71 +1,22 @@ name: Auto-merge client-library changes -on: - schedule: - - cron: "0 * * * *" - workflow_dispatch: {} +on: pull_request_target permissions: pull-requests: write jobs: - merge-if-ready: + merge: runs-on: ubuntu-latest + if: ${{ github.actor == 'gocardless-ci-robot[bot]' && github.event.pull_request.head.ref == 'template-changes' }} steps: - - name: Find open template-changes PR from gocardless-ci-robot - id: find-pr - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - - pr_number=$(gh pr list --repo "$GITHUB_REPOSITORY" --head template-changes --state open \ - --json number,author --jq '.[] | select(.author.login | endswith("gocardless-ci-robot")) | .number') - - if [ -z "$pr_number" ]; then - echo "No open template-changes PR from gocardless-ci-robot" - fi - - echo "pr_number=$pr_number" >> "$GITHUB_OUTPUT" - - # Approved by github-actions[bot] via the default token - a different actor to - # gocardless-ci-robot[bot], which merges below. This satisfies the repo's required - # approving review count through normal review mechanics, without needing any - # ruleset bypass for gocardless-ci-robot. - name: Approve PR - if: steps.find-pr.outputs.pr_number != '' + run: gh pr review --approve "$PR_URL" env: - GITHUB_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - - pr_number="${{ steps.find-pr.outputs.pr_number }}" - already_approved=$(gh pr view "$pr_number" --repo "$GITHUB_REPOSITORY" --json reviews \ - --jq '[.reviews[] | select(.author.login == "github-actions" and .state == "APPROVED")] | length') - - if [ "$already_approved" -gt 0 ]; then - echo "Already approved by github-actions[bot], skipping" - exit 0 - fi - - gh pr review "$pr_number" --repo "$GITHUB_REPOSITORY" --approve - - - name: Merge template-changes PR once it's been open 24h - if: steps.find-pr.outputs.pr_number != '' + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Enable auto-merge + run: gh pr merge --auto --merge "$PR_URL" env: + PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GOCARDLESS_CI_ROBOT_TOKEN }} - run: | - set -euo pipefail - - pr_number="${{ steps.find-pr.outputs.pr_number }}" - last_commit_date=$(gh pr view "$pr_number" --repo "$GITHUB_REPOSITORY" --json commits --jq '.commits[-1].committedDate') - age_seconds=$(( $(date -u +%s) - $(date -u -d "$last_commit_date" +%s) )) - - echo "PR #$pr_number last pushed to $((age_seconds / 3600))h ago" - - if [ "$age_seconds" -lt $((24 * 3600)) ]; then - echo "Still within the 24h window, skipping" - exit 0 - fi - - gh pr merge "$pr_number" --repo "$GITHUB_REPOSITORY" --auto --merge