diff --git a/.github/workflows/auto-close-stale-pr.yml b/.github/workflows/auto-close-stale-pr.yml index 5cdd7447f..00892eec5 100644 --- a/.github/workflows/auto-close-stale-pr.yml +++ b/.github/workflows/auto-close-stale-pr.yml @@ -15,9 +15,9 @@ jobs: days-before-issue-stale: -1 days-before-issue-close: -1 stale-pr-label: stale - stale-pr-message: "This pull request has been inactive for 21 days and will be automatically closed in 7 days if there is no further activity." - close-pr-message: "This pull request has been closed because it has been inactive for 28 days. You may submit a new pull request if desired." - days-before-pr-stale: 21 - days-before-pr-close: 7 + stale-pr-message: "This pull request has been inactive for 30 days and will be automatically closed in 15 days if there is no further activity." + close-pr-message: "This pull request has been closed because it has been inactive for 45 days. You may submit a new pull request if desired." + days-before-pr-stale: 30 + days-before-pr-close: 15 exempt-draft-pr: true repo-token: ${{ secrets.JF_BOT_TOKEN }} diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 5670dc7de..1b64af00a 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -94,7 +94,7 @@ jobs: git add . git commit -m "Bump ${{ github.event.inputs.versionType }} version" git push --set-upstream origin "${{ env.newBranch }}" - gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }} + gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release. Generated by `.github/workflows/bump-version.yml`" --label ignore-changelog --base ${{ env.targetBranch }} minor: if: ${{ github.event.inputs.versionType == 'minor' }} runs-on: ubuntu-latest @@ -161,7 +161,7 @@ jobs: git add . git commit -m "Bump ${{ github.event.inputs.versionType }} version" git push --set-upstream origin "${{ env.newBranch }}" - gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }} + gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release. Generated by `.github/workflows/bump-version.yml`" --label ignore-changelog --base ${{ env.targetBranch }} major: if: ${{ github.event.inputs.versionType == 'major' }} @@ -231,5 +231,5 @@ jobs: git add . git commit -m "Bump ${{ github.event.inputs.versionType }} version" git push --set-upstream origin "${{ env.newBranch }}" - gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }} + gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release. Generated by `.github/workflows/bump-version.yml`" --label ignore-changelog --base ${{ env.targetBranch }} \ No newline at end of file diff --git a/.github/workflows/lint-brightscript.yml b/.github/workflows/lint-brightscript.yml new file mode 100644 index 000000000..560bfd8be --- /dev/null +++ b/.github/workflows/lint-brightscript.yml @@ -0,0 +1,20 @@ +name: lint-brightscript +on: + pull_request: + paths: + - "**/*.brs" + - "**/*.bs" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - run: npm ci + - run: npx ropm install + - run: npm run validate + - run: npm run check-formatting diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml new file mode 100644 index 000000000..a5b9f9080 --- /dev/null +++ b/.github/workflows/lint-json.yml @@ -0,0 +1,23 @@ +name: lint-json +on: + pull_request: + paths: + - "!docs/api/**" + - "**/*.json" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - name: Validate JSON syntax + run: npm run lint-json \ No newline at end of file diff --git a/.github/workflows/lint-markdown.yml b/.github/workflows/lint-markdown.yml new file mode 100644 index 000000000..a3a0f1a28 --- /dev/null +++ b/.github/workflows/lint-markdown.yml @@ -0,0 +1,23 @@ +name: lint-markdown +on: + pull_request: + paths: + - "**/*.md" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3 + - name: Lint markdown files + run: npm run lint-markdown diff --git a/.github/workflows/lint-spelling.yml b/.github/workflows/lint-spelling.yml new file mode 100644 index 000000000..c2c9b8545 --- /dev/null +++ b/.github/workflows/lint-spelling.yml @@ -0,0 +1,22 @@ +name: lint-spelling +on: + pull_request: + paths: + - "**/*.md" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - name: Check markdown files for spelling errors + run: npm run lint-spelling diff --git a/.github/workflows/lint-translation-files.yml b/.github/workflows/lint-translation-files.yml new file mode 100644 index 000000000..011547e4c --- /dev/null +++ b/.github/workflows/lint-translation-files.yml @@ -0,0 +1,25 @@ +name: lint-translation-files +on: + pull_request: + paths: + - "locale/*/*.ts" + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - name: Install xmllint and xmlstarlet using apt (from cache) + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libxml2-utils xmlstarlet + - name: Validate XML syntax + run: xmllint --noout ./locale/en_US/translations.ts + - name: Save output of duplicate check + run: echo "tsDuplicates=$(xmlstarlet sel -t -m '/TS/context/message/source' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d | awk '{ printf "%s", $0 }')" >> $GITHUB_ENV + - name: Check for duplicates + run: xmlstarlet sel -t -m '/TS/context/message/source' -f -o ' ' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d + - name: Duplicates found + if: env.tsDuplicates != '' + run: exit 1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a46dfa9d8..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: lint -on: - pull_request: - -jobs: - brightscript: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - run: npm ci - - run: npx ropm install - - run: npm run validate - - run: npm run check-formatting - translation-files: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - name: Install xmllint and xmlstarlet using apt (from cache) - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libxml2-utils xmlstarlet - - name: Validate XML syntax - run: xmllint --noout ./locale/en_US/translations.ts - - name: Save output of duplicate check - run: echo "tsDuplicates=$(xmlstarlet sel -t -m '/TS/context/message/source' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d | awk '{ printf "%s", $0 }')" >> $GITHUB_ENV - - name: Check for duplicates - run: xmlstarlet sel -t -m '/TS/context/message/source' -f -o ' ' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d - - name: Duplicates found - if: env.tsDuplicates != '' - run: exit 1 - json: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - name: Validate JSON syntax - run: npm run lint-json - markdown: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3 - - name: Lint markdown files - run: npm run lint-markdown - spelling: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - name: Check markdown files for spelling errors - run: npm run lint-spelling diff --git a/.github/workflows/roku-analysis.yml b/.github/workflows/roku-analysis.yml index 2bac16036..e16b8546f 100644 --- a/.github/workflows/roku-analysis.yml +++ b/.github/workflows/roku-analysis.yml @@ -2,7 +2,6 @@ name: roku-analysis on: pull_request: - push: env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }}