Skip to content

Commit

Permalink
Updated branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed Sep 20, 2023
1 parent 45801af commit d938c82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/dependabot-merger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
id: create-pr
with:
script: |
const uniqueBranchName = 'dependabot-combined-prs-' + new Date().toISOString();
const pulls = await github.paginate('GET /repos/:owner/:repo/pulls', {
owner: context.repo.owner,
repo: context.repo.repo
Expand All @@ -40,7 +41,7 @@ jobs:
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/heads/' + 'dependabot-combined-prs',
ref: 'refs/heads/' + uniqueBranchName,
sha: baseBranchSHA
});
} catch (error) {
Expand All @@ -56,7 +57,7 @@ jobs:
await github.rest.repos.merge({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'dependabot-combined-prs',
base: uniqueBranchName,
head: branch,
});
console.log('Merged branch ' + branch);
Expand All @@ -78,7 +79,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Combined Dependabot PR',
head: 'dependabot-combined-prs',
head: uniqueBranchName,
base: baseBranch,
body: body
});
Expand Down

0 comments on commit d938c82

Please sign in to comment.