From a3a73aed83213d4b3fdda3ff90cabeac82185844 Mon Sep 17 00:00:00 2001 From: Tomas Date: Mon, 21 Sep 2026 15:14:59 +0300 Subject: [PATCH 1/3] Add github workflow --- .github/workflows/prefill-pr.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/prefill-pr.yml diff --git a/.github/workflows/prefill-pr.yml b/.github/workflows/prefill-pr.yml new file mode 100644 index 00000000..4998c8d0 --- /dev/null +++ b/.github/workflows/prefill-pr.yml @@ -0,0 +1,36 @@ +name: Prefill PR Body + +on: + pull_request: + types: [opened] + +permissions: + pull-requests: write + +jobs: + update-pr: + runs-on: [ unity-linux-runner ] + + steps: + - name: Update PR body + uses: actions/github-script@v7 + with: + script: | + const MARKER = ""; + + const currentBody = context.payload.pull_request.body || ""; + if (currentBody.includes(MARKER)) return; + + const branch = encodeURIComponent(context.payload.pull_request.head.ref); + const yamatoUrl = "https://yamato.ds.unity3d.com/project/277/branch/" + branch + "/recent-jobs"; + + const yamatoBadge = "[![Yamato CI](https://img.shields.io/badge/Yamato-CI-blue?logo=unity&logoColor=white)](" + yamatoUrl + ")"; + + const buttons = MARKER + "\n" + yamatoBadge + " " + grafanaBadge + "\n" + MARKER; + + await github.rest.pulls.update({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + body: `${buttons}\n\n${currentBody}` + }); \ No newline at end of file From b7732f7ab75e556ac86c527993c0e3b152dcef5b Mon Sep 17 00:00:00 2001 From: Tomas Dirvanauskas Date: Mon, 21 Sep 2026 15:26:18 +0300 Subject: [PATCH 2/3] Update .github/workflows/prefill-pr.yml Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com> --- .github/workflows/prefill-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prefill-pr.yml b/.github/workflows/prefill-pr.yml index 4998c8d0..f5e04ca5 100644 --- a/.github/workflows/prefill-pr.yml +++ b/.github/workflows/prefill-pr.yml @@ -26,7 +26,7 @@ jobs: const yamatoBadge = "[![Yamato CI](https://img.shields.io/badge/Yamato-CI-blue?logo=unity&logoColor=white)](" + yamatoUrl + ")"; - const buttons = MARKER + "\n" + yamatoBadge + " " + grafanaBadge + "\n" + MARKER; + const buttons = MARKER + "\n" + yamatoBadge + "\n" + MARKER; await github.rest.pulls.update({ owner: context.repo.owner, From 46b51ef2918eafdae5dc0db852a2d98168488594 Mon Sep 17 00:00:00 2001 From: Tomas Date: Mon, 21 Sep 2026 15:52:41 +0300 Subject: [PATCH 3/3] change agent --- .github/workflows/prefill-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prefill-pr.yml b/.github/workflows/prefill-pr.yml index 4998c8d0..0a8dc269 100644 --- a/.github/workflows/prefill-pr.yml +++ b/.github/workflows/prefill-pr.yml @@ -9,7 +9,7 @@ permissions: jobs: update-pr: - runs-on: [ unity-linux-runner ] + runs-on: ubuntu-latest steps: - name: Update PR body