Skip to content

Commit 74c5483

Browse files
committed
Using branchNames per @Nishnha's suggestion
1 parent 9967bee commit 74c5483

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dry-run.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { hideBin } from 'yargs/helpers'
77

88
import { getMessage } from './dependabot/verified_commits'
99
import { parse } from './dependabot/update_metadata'
10-
import { parseNwo } from './dependabot/util'
10+
import { getBranchNames, parseNwo } from './dependabot/util'
1111

1212
async function check (args: any): Promise<void> {
1313
try {
@@ -42,8 +42,9 @@ async function check (args: any): Promise<void> {
4242

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

46-
const updatedDependencies = parse(commitMessage, 'dependabot/test_ecosystem/test_directory', 'test_branch')
47+
const updatedDependencies = parse(commitMessage, branchNames.headName, branchNames.baseName)
4748

4849
if (updatedDependencies.length > 0) {
4950
console.log('Updated dependencies:')

0 commit comments

Comments
 (0)