Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/develop_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const run = async () => {
base: "staging",
}
);
console.log(createpr?.data);
if (createpr?.data) {
axios
.post(
Expand All @@ -54,6 +55,21 @@ const run = async () => {
.catch((error) => {
console.log("FAILED: Send slack webhook", error);
});
} else {
// fetch pr from branch_name to staging
// update existing pr
console.log("pr exists");
axios
.post(
SLACK_WEBHOOK_URL,
JSON.stringify(`PR from ${branch_name} to staging already exist`)
)
.then((response) => {
console.log("SUCCEEDED: Sent slack webhook", response.data);
})
.catch((error) => {
console.log("FAILED: Send slack webhook", error);
});
}
const compare_commits = await octokit.request(
`GET /repos/${context.payload?.repository?.full_name}/compare/staging...${branch_name}`,
Expand Down