Skip to content

Commit 37d2f78

Browse files
authored
Merge pull request #140 from pangaeatech/fix_name
Renaming `target_branch` to `target-branch`
2 parents 9fd8ff4 + 7bf7b54 commit 37d2f78

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Subsequent actions will have access to the following outputs:
4141
- The `directory` configuration that was used by dependabot for this updated Dependency.
4242
- `steps.dependabot-metadata.outputs.package-ecosystem`
4343
- The `package-ecosystem` configuration that was used by dependabot for this updated Dependency.
44-
- `steps.dependabot-metadata.outputs.target_branch`
45-
- The `target_branch` configuration that was used by dependabot for this updated Dependency.
44+
- `steps.dependabot-metadata.outputs.target-branch`
45+
- The `target-branch` configuration that was used by dependabot for this updated Dependency.
4646

4747
**Note:** These outputs will only be populated if the target Pull Request was opened by Dependabot and contains
4848
**only** Dependabot-created commits.

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ outputs:
2020
description: 'The `directory` configuration that was used by dependabot for this updated Dependency.'
2121
package-ecosystem:
2222
description: 'The `package-ecosystem` configuration that was used by dependabot for this updated Dependency.'
23-
target_branch:
24-
description: 'The `target_branch` configuration that was used by dependabot for this updated Dependency.'
23+
target-branch:
24+
description: 'The `target-branch` configuration that was used by dependabot for this updated Dependency.'
2525
runs:
2626
using: 'node12'
2727
main: 'dist/index.js'

dist/index.js

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

src/dependabot/output.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test('when given a single dependency it sets its values', async () => {
3434
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-minor')
3535
expect(core.setOutput).toBeCalledWith('directory', 'wwwroot')
3636
expect(core.setOutput).toBeCalledWith('package-ecosystem', 'nuget')
37-
expect(core.setOutput).toBeCalledWith('target_branch', 'main')
37+
expect(core.setOutput).toBeCalledWith('target-branch', 'main')
3838
})
3939

4040
test('when given a multiple dependencies, it uses the highest values for types', async () => {
@@ -82,7 +82,7 @@ test('when given a multiple dependencies, it uses the highest values for types',
8282
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-major')
8383
expect(core.setOutput).toBeCalledWith('directory', '')
8484
expect(core.setOutput).toBeCalledWith('package-ecosystem', '')
85-
expect(core.setOutput).toBeCalledWith('target_branch', '')
85+
expect(core.setOutput).toBeCalledWith('target-branch', '')
8686
})
8787

8888
test('when the dependency has no update type', async () => {
@@ -110,7 +110,7 @@ test('when the dependency has no update type', async () => {
110110
expect(core.setOutput).toBeCalledWith('update-type', null)
111111
expect(core.setOutput).toBeCalledWith('directory', '')
112112
expect(core.setOutput).toBeCalledWith('package-ecosystem', '')
113-
expect(core.setOutput).toBeCalledWith('target_branch', '')
113+
expect(core.setOutput).toBeCalledWith('target-branch', '')
114114
})
115115

116116
test('when given a multiple dependencies, and some do not have update types', async () => {
@@ -158,5 +158,5 @@ test('when given a multiple dependencies, and some do not have update types', as
158158
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-minor')
159159
expect(core.setOutput).toBeCalledWith('directory', '')
160160
expect(core.setOutput).toBeCalledWith('package-ecosystem', '')
161-
expect(core.setOutput).toBeCalledWith('target_branch', '')
161+
expect(core.setOutput).toBeCalledWith('target-branch', '')
162162
})

src/dependabot/output.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function set (updatedDependencies: Array<updatedDependency>): void {
3131
core.info(`outputs.update-type: ${updateType}`)
3232
core.info(`outputs.directory: ${directory}`)
3333
core.info(`outputs.package-ecosystem: ${ecosystem}`)
34-
core.info(`outputs.target_branch: ${target}`)
34+
core.info(`outputs.target-branch: ${target}`)
3535
core.endGroup()
3636

3737
core.setOutput('updated-dependencies-json', updatedDependencies)
@@ -40,7 +40,7 @@ export function set (updatedDependencies: Array<updatedDependency>): void {
4040
core.setOutput('update-type', updateType)
4141
core.setOutput('directory', directory)
4242
core.setOutput('package-ecosystem', ecosystem)
43-
core.setOutput('target_branch', target)
43+
core.setOutput('target-branch', target)
4444
}
4545

4646
function maxDependencyTypes (updatedDependencies: Array<updatedDependency>): string {

src/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ test('it sets the updated dependency as an output for subsequent actions', async
102102
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-minor')
103103
expect(core.setOutput).toBeCalledWith('directory', '/')
104104
expect(core.setOutput).toBeCalledWith('package-ecosystem', 'nuget')
105-
expect(core.setOutput).toBeCalledWith('target_branch', 'main')
105+
expect(core.setOutput).toBeCalledWith('target-branch', 'main')
106106
})
107107

108108
test('if there are multiple dependencies, it summarizes them', async () => {
@@ -164,7 +164,7 @@ test('if there are multiple dependencies, it summarizes them', async () => {
164164
expect(core.setOutput).toBeCalledWith('update-type', 'version-update:semver-major')
165165
expect(core.setOutput).toBeCalledWith('directory', 'api/main')
166166
expect(core.setOutput).toBeCalledWith('package-ecosystem', 'npm_and_yarn')
167-
expect(core.setOutput).toBeCalledWith('target_branch', 'trunk')
167+
expect(core.setOutput).toBeCalledWith('target-branch', 'trunk')
168168
})
169169

170170
test('it sets the action to failed if there is an unexpected exception', async () => {

0 commit comments

Comments
 (0)