Skip to content

Commit

Permalink
have to make a call-out to get the details of the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaddell committed Feb 9, 2022
1 parent 7b566f4 commit ca81f58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dry-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ async function check (args: any): Promise<void> {

// Retries the commit message if the PR is from Dependabot
const commitMessage = await getMessage(githubClient, actionContext)
const pull_request: any = await (await githubClient.rest.pulls.get({ owner: repoDetails.owner, repo: repoDetails.repo, pull_number: args.prNumber })).data

const newContext = new Context()
newContext.payload = {
pull_request: pull_request,
repository: actionContext.payload.repository
}

if (commitMessage) {
console.log('This appears to be a valid Dependabot Pull Request.')
const branchNames = getBranchNames(github.context)
const branchNames = getBranchNames(newContext)

const updatedDependencies = parse(commitMessage, branchNames.headName, branchNames.baseName)

Expand Down

0 comments on commit ca81f58

Please sign in to comment.