This is an automated email from the ASF dual-hosted git repository. erikrit pushed a commit to branch erik-ritter--prevent-non-typescript-files in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 9d29e7881b3932f2b02205d6a2cefa1b567dea86 Author: Erik Ritter <[email protected]> AuthorDate: Sun May 24 21:23:56 2020 -0700 Add workflow preventing non TypeScript Files --- .github/workflows/prevent_non_typescript_files.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/prevent_non_typescript_files.yml b/.github/workflows/prevent_non_typescript_files.yml new file mode 100644 index 0000000..6ea255e --- /dev/null +++ b/.github/workflows/prevent_non_typescript_files.yml @@ -0,0 +1,28 @@ +name: Prevent non-TypeScript files + +on: + pull_request: + branches: + - master + +jobs: + comment: + name: Comment about preferring TypeScript + runs-on: ubuntu-latest + steps: + - name: Get changed files + id: changed + uses: lots0logs/[email protected] + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Determine if a .js or .jsx file was added + id: check + run: | + echo ::set-output name=was_js_file_added::$(jq 'map(endswith(".js") or endswith(".jsx"))' ${HOME}/files_added.json | jq 'reduce .[] as $is_js (false; . or $is_js)') + - name: Comment about preferring TypeScript + uses: harupy/comment-on-pr@master + if: ${{ steps.check.outputs.was_js_file_added }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + filename: comment_preferring_typescript.md
