Skip to content

Commit

Permalink
fix: don't list nested dirs in modules folders ci (chanzuckerberg#719)
Browse files Browse the repository at this point in the history
This PR fixes a bug where modules have next folders failing CICD checks.
  • Loading branch information
jakeyheath authored Sep 1, 2022
1 parent 3dfc621 commit e3e6c42
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/templates/.github/workflows/fogg_ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
const changedFiles = {{`${{ steps.filter.outputs.changed_files }}`}}
const changedDirs = changedFiles.map(f => path.dirname(f))
console.log(`Found the following changed dirs: ${JSON.stringify(changedDirs, null, 2)}\n OG: ${JSON.stringify(changedFiles, null, 2)} `)
const changedModules = [... new Set(changedDirs.filter(d => d.indexOf("modules") !== -1))]
const changedModules = [... new Set(changedDirs.filter(d => d.indexOf("modules") !== -1 && d.split("/").length === 3))]
const changedAccounts = [... new Set(changedDirs.filter(d => d.indexOf("accounts") !== -1 && d.split("/").length === 3))]
const changedEnvs = [... new Set(changedDirs.filter(d => d.indexOf("envs") !== -1 && d.split("/").length === 4))]
const allChanges = [...changedAccounts,...changedEnvs, ...changedModules]
Expand Down
2 changes: 1 addition & 1 deletion testdata/github_actions/.github/workflows/fogg_ci.yml

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

2 changes: 1 addition & 1 deletion testdata/v2_full_yaml/.github/workflows/fogg_ci.yml

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

0 comments on commit e3e6c42

Please sign in to comment.