Skip to content

Commit

Permalink
Using branchNames per @Nishnha's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaddell committed Feb 9, 2022
1 parent 9967bee commit 74c5483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/dry-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { hideBin } from 'yargs/helpers'

import { getMessage } from './dependabot/verified_commits'
import { parse } from './dependabot/update_metadata'
import { parseNwo } from './dependabot/util'
import { getBranchNames, parseNwo } from './dependabot/util'

async function check (args: any): Promise<void> {
try {
Expand Down Expand Up @@ -42,8 +42,9 @@ async function check (args: any): Promise<void> {

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

const updatedDependencies = parse(commitMessage, 'dependabot/test_ecosystem/test_directory', 'test_branch')
const updatedDependencies = parse(commitMessage, branchNames.headName, branchNames.baseName)

if (updatedDependencies.length > 0) {
console.log('Updated dependencies:')
Expand Down

0 comments on commit 74c5483

Please sign in to comment.