Skip to content

Commit

Permalink
add pull request failure request changes
Browse files Browse the repository at this point in the history
  • Loading branch information
suit-up-repos committed Feb 28, 2024
1 parent 723d066 commit 59054c5
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/ci-code-validation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI-Code-Validation
on: [push]
on:
push:
pull_request:
types: [opened, edited, reopened, synchronize, ready_for_review]

jobs:
luau-lsp:
Expand All @@ -14,10 +17,6 @@ jobs:
- name: Install dependencies
uses: ok-nick/[email protected]

# - name: Create folder
# run: |
# mkdir Packages -p

- name: Download type files
run: curl -L "https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua" > globalTypes.d.lua

Expand All @@ -33,6 +32,13 @@ jobs:
- name: Lint with luau-lsp
run: luau-lsp analyze --defs=globalTypes.d.lua --sourcemap=sourcemap.json --no-strict-dm-types --ignore=Packages/** --flag:LuauTinyControlFlowAnalysis=True src

- name: request changes
if: ${{ github.event.pull_request && failure() }}
uses: ntsd/auto-request-changes-action@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
review-message: "Fix Selene errors"

- name: Send mail
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
Expand Down Expand Up @@ -67,12 +73,12 @@ jobs:
- name : Lint with selene
run: selene src

#- name: Check for StyLua formatting
# uses: JohnnyMorganz/stylua-action@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# version: latest
# args: --check src
- name: request changes
if: ${{ github.event.pull_request && failure() }}
uses: ntsd/auto-request-changes-action@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
review-message: "Fix Luau-lsp errors"

- name: Send mail
if: ${{ failure() }}
Expand Down

0 comments on commit 59054c5

Please sign in to comment.