Skip to content

add pull request failure request changes #27

add pull request failure request changes

add pull request failure request changes #27

name: CI-Code-Validation
on:
push:
pull_request:
types: [opened, edited, reopened, synchronize, ready_for_review]
jobs:
luau-lsp:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
uses: ok-nick/[email protected]
- name: Download type files
run: curl -L "https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua" > globalTypes.d.lua
- name: Install Wally
run: wally install
- name: Generate sourcemaps
run: rojo sourcemap --include-non-scripts --output sourcemap.json
- name: Generate package types
run: wally-package-types --sourcemap sourcemap.json Packages/
- 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
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials (need to add [email protected] to current repo secrets)
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to (send directly to production slack channel)
to: [email protected]
# from email name
from: [email protected]
selene:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
uses: ok-nick/[email protected]
- name : Lint with selene
run: selene 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() }}
uses: dawidd6/action-send-mail@v3
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials (need to add [email protected] to current repo secrets)
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to (send directly to production slack channel)
to: [email protected]
# from email name
from: [email protected]