Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules


.env
6 changes: 4 additions & 2 deletions action/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12406,7 +12406,6 @@ const octokit = github.getOctokit(GITHUB_TOKEN);
const { context = {} } = github;

const run = async () => {
// check branch;
let branch_name = context.payload?.head_commit?.message
?.split("from")[1]
?.split("\n")[0]
Expand All @@ -12418,6 +12417,8 @@ const run = async () => {
branch_name = context.payload.ref?.replace("refs/heads/", "");
}

console.log(branch_name);

// fetching commits
let commits = "";
try {
Expand Down Expand Up @@ -12563,12 +12564,13 @@ const run = async () => {
run();

const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => {
console.log("head-branch", branch);
try {
const existing_pr = await octokit.rest.pulls.list({
owner,
repo,
state: "open",
head: branch,
head: owner + ":" + branch,
base: DESTINATION_BRANCH,
});
if (existing_pr?.data?.length === 0) {
Expand Down
5 changes: 4 additions & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const run = async () => {
branch_name = context.payload.ref?.replace("refs/heads/", "");
}

console.log(branch_name);

// fetching commits
let commits = "";
try {
Expand Down Expand Up @@ -165,12 +167,13 @@ const run = async () => {
run();

const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => {
console.log("head-branch", branch);
try {
const existing_pr = await octokit.rest.pulls.list({
owner,
repo,
state: "open",
head: branch,
head: owner + ":" + branch,
base: DESTINATION_BRANCH,
});
if (existing_pr?.data?.length === 0) {
Expand Down