From 7f2f846faf6f0101e2516457c81af147af333999 Mon Sep 17 00:00:00 2001 From: gsd-sync Date: Mon, 20 Jul 2026 17:35:02 +0200 Subject: [PATCH] chore: adopt gsd agent automation --- .github/workflows/agent-coding.yml | 4 +++- .github/workflows/agent-devops.yml | 6 ++++-- .github/workflows/agent-security.yml | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/agent-coding.yml b/.github/workflows/agent-coding.yml index 9d9a1cc..f327bea 100644 --- a/.github/workflows/agent-coding.yml +++ b/.github/workflows/agent-coding.yml @@ -55,6 +55,7 @@ jobs: env: CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }} REPO: ${{ github.repository }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} ISSUE_TITLE: ${{ github.event.issue.title }} ISSUE_BODY: ${{ github.event.issue.body }} ISSUE_URL: ${{ github.event.issue.html_url }} @@ -75,9 +76,10 @@ jobs: PAYLOAD=$(jq -n \ --arg prompt "$PROMPT" \ --arg repo "$REPO" \ + --arg ref "$DEFAULT_BRANCH" \ '{ prompt: { text: $prompt }, - source: { repository: ("github.com/" + $repo), ref: "staging" }, + source: { repository: ("github.com/" + $repo), ref: $ref }, target: { autoCreatePr: true, openAsCursorGithubApp: true }, model: "composer-2.5" }') diff --git a/.github/workflows/agent-devops.yml b/.github/workflows/agent-devops.yml index b5166ee..da54472 100644 --- a/.github/workflows/agent-devops.yml +++ b/.github/workflows/agent-devops.yml @@ -46,13 +46,14 @@ jobs: steps: - uses: actions/checkout@v7 with: - ref: staging + ref: ${{ github.event.repository.default_branch }} - name: Trigger Cursor agent id: trigger env: CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }} REPO: ${{ github.repository }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} PR_TITLE: ${{ github.event.pull_request.title }} PR_URL: ${{ github.event.pull_request.html_url }} PR_BASE: ${{ github.event.pull_request.base.ref }} @@ -73,9 +74,10 @@ jobs: PAYLOAD=$(jq -n \ --arg prompt "$PROMPT" \ --arg repo "$REPO" \ + --arg ref "$DEFAULT_BRANCH" \ '{ prompt: { text: $prompt }, - source: { repository: ("github.com/" + $repo), ref: "staging" }, + source: { repository: ("github.com/" + $repo), ref: $ref }, target: { autoCreatePr: false, openAsCursorGithubApp: true }, model: "composer-2.5" }') diff --git a/.github/workflows/agent-security.yml b/.github/workflows/agent-security.yml index 65167fd..34003c6 100644 --- a/.github/workflows/agent-security.yml +++ b/.github/workflows/agent-security.yml @@ -162,6 +162,7 @@ jobs: env: CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }} REPO: ${{ github.repository }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} run: | set -euo pipefail PROMPT=$(jq -Rs \ @@ -179,9 +180,10 @@ jobs: PAYLOAD=$(jq -n \ --arg prompt "$PROMPT" \ --arg repo "$REPO" \ + --arg ref "$DEFAULT_BRANCH" \ '{ prompt: { text: $prompt }, - source: { repository: ("github.com/" + $repo), ref: "main" }, + source: { repository: ("github.com/" + $repo), ref: $ref }, target: { autoCreatePr: true, openAsCursorGithubApp: true }, model: "composer-2.5" }')