Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiraalA committed Apr 2, 2024
1 parent 62852a7 commit 2a1e63c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,23 @@ jobs:
} else {
console.log('No pull request context found. Creating a new pull request...');
const commits = await github.rest.repos.listCommits({
owner,
repo,
sha: context.sha
});
const commitMessages = commits.data.map(commit => commit.commit.message);
const title = commitMessages[0]; // Use the first commit message as the title
const body = commitMessages.join('\n\n'); // Join all commit messages as the body
const newPullRequest = await github.rest.pulls.create({
owner,
repo,
title: 'Your pull request title here',
head: 'main', // Replace with the name of your branch
base: 'main', // Replace with the name of the base branch
body: 'Your pull request description here'
title,
head: 'dev-deployments', // Replace with the name of your feature branch
base: 'main',
body
});
console.log('New pull request created:', newPullRequest.data);
Expand Down

0 comments on commit 2a1e63c

Please sign in to comment.