Skip to content

Commit 29e90c7

Browse files
fix(ci): pin git author to opencode-agent[bot] via env + prompt guidance
The opencode agent kept overwriting git config with opencode-bot <[email protected]>, which GitHub maps to the registered OpenCode user (Apruzzese Francesco), misattributing 3 commits. Pin GIT_AUTHOR_*/GIT_COMMITTER_* and forbid the agent from touching user.name/user.email (upstream anomalyco/opencode#30409, PR #30507).
1 parent 90ce77f commit 29e90c7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/opencode-schedule.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ jobs:
7373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7474
RELAY: ${{ github.event.inputs.relay || 'false' }}
7575
RUN_ID: ${{ github.run_id }}
76+
GIT_AUTHOR_NAME: opencode-agent[bot]
77+
GIT_AUTHOR_EMAIL: 41898282+opencode-agent[bot]@users.noreply.github.com
78+
GIT_COMMITTER_NAME: opencode-agent[bot]
79+
GIT_COMMITTER_EMAIL: 41898282+opencode-agent[bot]@users.noreply.github.com
7680
PROMPT: |
7781
You are the FULLY AUTONOMOUS maintainer of fedora-nexus
7882
(https://github.com/Ackerman-00/fedora-nexus), a self-updating RPM
@@ -116,6 +120,15 @@ jobs:
116120
actions write (inspect/watch GitHub Actions runs), pull-requests write
117121
(merge), and issues write (open/close). Just use `gh` normally. Always
118122
`git fetch origin && git pull --rebase origin main` before pushing.
123+
- GIT IDENTITY (MANDATORY): git author identity is ALREADY configured in this
124+
environment as `opencode-agent[bot] <41898282+opencode-agent[bot]@users.noreply.github.com>`
125+
(both via git config and GIT_AUTHOR_*/GIT_COMMITTER_* env vars). Before creating
126+
ANY commit, reuse the existing identity as-is. NEVER run
127+
`git config user.name` / `git config user.email`, NEVER invent or guess
128+
noreply email addresses (e.g. [email protected] maps to a real
129+
human's GitHub account and will misattribute your commits as that person), and
130+
NEVER set a commit author that is not `opencode-agent[bot]`. Verify with
131+
`git config --get user.name` / `git config --get user.email` if unsure.
119132
120133
First, read this repository thoroughly: list every package directory, study
121134
the spec files and update.sh scripts (version/source URLs/checksums/macros),

0 commit comments

Comments
 (0)