You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change integrates the Gemini API into the cherry-pick workflow to
automatically resolve merge conflicts. When a cherry-pick fails, the
gemini-cli action is invoked to attempt to resolve any conflicts.
This reduces manual intervention for routine cherry-picks.
Bug: 488071229
const logFooter = `Check the log at ${context.serverUrl}/${REPOSITORY}/actions/runs/${context.runId} for details.`;
168
+
if (NEW_PR_NUMBER == '') {
124
169
// Comment on the originating PR if creating a cherry pick PR failed.
125
170
github.rest.issues.createComment({
126
171
issue_number: context.payload.number,
127
172
owner: context.repo.owner,
128
173
repo: context.repo.repo,
129
-
body: '> [!CAUTION]\n> Creating the cherry pick PR failed! Check the log at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} for details.'
174
+
body: `> [!CAUTION]\n> Creating the cherry pick PR failed!\n\n${logFooter}`
130
175
});
131
-
} else if ('${{ steps.cherry-pick.outcome }}' == 'failure') {
176
+
} else if (CHERRY_PICK_OUTCOME == 'failure') {
132
177
// Comment on the new PR if the cherry pick failed.
178
+
const cautionHeader = '> [!CAUTION]\n> There were merge conflicts while cherry picking!';
179
+
let geminiNotice;
180
+
if (GEMINI_COMMIT_SHA) {
181
+
geminiNotice = `\n\nGemini has attempted to fix the conflicts in [this commit](${context.serverUrl}/${REPOSITORY}/pull/${NEW_PR_NUMBER}/commits/${GEMINI_COMMIT_SHA}). Please review carefully before merging.`;
body: '\n> [!CAUTION]\n> There were merge conflicts while cherry picking! Check out [${{ env.CHERRY_PICK_BRANCH }}](${{ github.repository }}/tree/${{ env.CHERRY_PICK_BRANCH }}) and fix the conflicts before proceeding. Check the log at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} for details.'
0 commit comments