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
body: "⚠️ **Warning: PR targeting master branch detected!**\n\n**This PR is targeting `master` but should target `dev` instead.**\n\nAccording to our [CONTRIBUTING.md](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) and [RELEASE_POLICY.md](https://github.com/HyDE-Project/HyDE/blob/master/RELEASE_POLICY.md):\n\n- **All pull requests must be submitted to the `dev` branch**\n- Changes go through `dev` first for testing before being merged to `master` during release windows\n- **PRs to `master` are only allowed for emergencies**\n\n**Required Action:**\n1. **Change the base branch from `master` to `dev`**\n2. Follow the [pull request template](https://github.com/HyDE-Project/HyDE/blob/master/.github/PULL_REQUEST_TEMPLATE.md)\n\n**If this is an emergency fix, please add a comment explaining why it needs to target `master` directly.**\n\n---\n*This is an automated review enforcing our contribution workflow.*"
58
+
issue_number,
59
+
body: "⚠️ **Warning: PR targeting master branch detected!** Please change the base branch to `dev` instead of `master`. See our [CONTRIBUTING.md](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) for details."
57
60
});
58
-
console.log('Warning review added to fork PR #' + issue_number);
61
+
console.log('Comment added to fork PR #' + issue_number);
59
62
} else {
60
-
console.log('Warning review already exists for fork PR #' + issue_number);
63
+
console.log('Comment already exists for fork PR #' + issue_number);
61
64
}
62
65
} catch (error) {
63
-
console.log('Failed to create review for fork PR:', error.message);
64
-
// Fallback: try to add a regular comment anyway
66
+
console.log('Failed to create comment for fork PR, trying review:', error.message);
body: "⚠️ **Warning: PR targeting master branch detected!** Please change the base branch to `dev` instead of `master`. See our [CONTRIBUTING.md](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) for details."
72
+
pull_number: issue_number
71
73
});
72
-
console.log('Fallback comment added to fork PR #' + issue_number);
73
-
} catch (fallbackError) {
74
-
console.log('Both review and comment failed for fork PR:', fallbackError.message);
body: "⚠️ **Warning: PR targeting master branch detected!** Please change the base branch to `dev` instead of `master`. See our [CONTRIBUTING.md](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) for details."
87
+
});
88
+
console.log('Review added to fork PR #' + issue_number);
89
+
} else {
90
+
console.log('Review already exists for fork PR #' + issue_number);
91
+
}
92
+
} catch (reviewError) {
93
+
console.log('Both comment and review failed for fork PR:', reviewError.message);
0 commit comments