Skip to content

Commit

Permalink
feat: return modules where lock file changed (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
abemedia authored Aug 18, 2021
1 parent b64df16 commit 1b38d4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { basename } from 'path'
import { context, getOctokit } from '@actions/github'
import {
PullRequestEvent,
Expand Down Expand Up @@ -62,7 +63,7 @@ export function getModulePaths<T extends Record<string, unknown>>(
): string[] {
const result = files?.reduce<string[]>((paths, file) => {
const path = file[pathProp] as string
if (path.endsWith('.tf')) {
if (path.endsWith('.tf') || basename(path) === '.terraform.lock.hcl') {
paths.push(path.substring(0, path.lastIndexOf('/')))
}
return paths
Expand Down

0 comments on commit 1b38d4a

Please sign in to comment.