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
console.log('ℹ️ PR already merged or auto-merge already enabled');
131
-
} else {
132
-
throw error;
133
-
}
134
-
}
135
-
136
-
- name: Comment on PR
137
-
uses: actions/github-script@v7
138
-
with:
139
-
script: |
140
-
const { owner, repo, number } = context.issue;
141
-
142
-
try {
143
-
await github.rest.issues.createComment({
144
-
owner,
145
-
repo,
146
-
issue_number: number,
147
-
body: `🤖 **Dependabot Auto-Merge**\n\n✅ All CI checks passed!\n\n**Auto-merge enabled** with squash strategy.\nThis PR will merge automatically when ready.\n\n**Merge details:**\n- Strategy: Squash merge\n- Branch: Will be deleted after merge\n- Git history: Clean linear history\n\n---\n*This comment was generated by the Dependabot auto-merge workflow.*`,
148
-
});
149
-
} catch (error) {
150
-
// Comment might fail if PR already merged
151
-
console.log('Could not post comment (PR may have been merged)');
body: `⚠️ **Dependabot Auto-Merge Failed**\n\nThe auto-merge workflow encountered an issue:\n\n\`\`\`\n${{ failure() }}\n\`\`\`\n\n**Possible reasons:**\n- CI checks did not pass\n- Merge conflicts detected\n- Auto-merge not available on this branch\n- Timeout waiting for CI checks\n\n**Action required:** Please review CI logs and merge manually if appropriate.\n\n---\n*This comment was generated by the Dependabot auto-merge workflow.*`,
if (error.message.includes('already merged') || error.message.includes('already enabled')) {
92
+
console.log('ℹ️ PR already merged or auto-merge already enabled');
93
+
} else {
94
+
throw error;
95
+
}
96
+
}
97
+
98
+
- name: Comment on PR
99
+
uses: actions/github-script@v7
100
+
with:
101
+
script: |
102
+
const { owner, repo, number } = context.issue;
103
+
try {
104
+
await github.rest.issues.createComment({
105
+
owner,
106
+
repo,
107
+
issue_number: number,
108
+
body: `🤖 **Dependabot Auto-Merge**\n\n✅ All CI checks passed!\n**Auto-merge enabled** (squash strategy).\nThis PR will merge automatically when ready.\n\n---\n*This comment was generated by Dependabot auto-merge workflow.*`,
109
+
});
110
+
} catch (error) {
111
+
console.log('Could not post comment (PR may already be merged).');
body: `⚠️ **Dependabot Auto-Merge Failed**\n\nThe auto-merge workflow encountered an issue.\n\n**Possible reasons:**\n- CI checks did not pass\n- Merge conflicts detected\n- Auto-merge not available on this branch\n- Timeout waiting for CI checks\n\n**Action required:** Please review CI logs and merge manually if appropriate.\n\n---\n*This comment was generated by Dependabot auto-merge workflow.*`,
0 commit comments