Skip to content

Commit 4029ec0

Browse files
sorahclaude
andcommitted
GitHubPusher: read initial blob_sha from base_branch
Without ref:, the API defaults to the repo's default branch, which differs from base_branch when the conference specifies a custom branch. This caused a guaranteed conflict on the first update_contents attempt, wasting a retry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4057c11 commit 4029ec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/jobs/generate_sponsors_yaml_file_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def reset_branch
188188

189189
def commit_content
190190
begin
191-
blob_sha = octokit.contents(@repo.name, path: @filepath)[:sha]
191+
blob_sha = octokit.contents(@repo.name, path: @filepath, ref: base_branch)[:sha]
192192
rescue Octokit::NotFound
193193
blob_sha = nil
194194
end

0 commit comments

Comments
 (0)