diff --git a/.github/workflows/fix.yml b/.github/workflows/fix.yml index 0e8ba3ce7..63e8d68e8 100644 --- a/.github/workflows/fix.yml +++ b/.github/workflows/fix.yml @@ -36,8 +36,10 @@ jobs: - name: Run fix-sanity script (fork repo, sanity only) if: github.repository_owner != 'trustwallet' run: npm run fix-sanity + - name: Debug # TODO remove + run: echo $GITHUB_REF $GITHUB_BASE_REF {{github.branch}} {{github.ref}} - name: Run history - if: github.repository_owner == 'trustwallet' && github.branch == 'master' + if: github.repository_owner == 'trustwallet' && (github.base_ref == 'master' || github.ref == 'master') run: npm run history - name: Show result (diff) (run 'npm run fix' locally) run: | diff --git a/script/generic/history.ts b/script/generic/history.ts index e74562ba2..5a0b307e1 100644 --- a/script/generic/history.ts +++ b/script/generic/history.ts @@ -14,7 +14,8 @@ class VersionInfo { const FilenameLatest = "history/LATEST.json"; const FilenameChangeTemplate = "history/versions/"; -const IgnoreHistoryPrefix = "history/"; +const IncludeHistoryPrefix1 = "blockchains/"; +const IncludeHistoryPrefix2 = "dapps/"; const TooManyChangesLimit = 40; //const util = require('util'); @@ -82,8 +83,7 @@ async function getChangedFiles(commitStart: string, commitEnd: string): Promise< function filterChangedFiles(files: string[]): string[] { return files.filter(l => { - if (l.startsWith(IgnoreHistoryPrefix)) return false; - return true; + return (l.startsWith(IncludeHistoryPrefix1) || l.startsWith(IncludeHistoryPrefix2)); }); }