Skip to content

Commit

Permalink
Change lint yml
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <jiallian@amazon.com>
  • Loading branch information
RyanL1997 committed Dec 21, 2023
1 parent 999dadc commit 109fc25
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [pull_request]

env:
PLUGIN_NAME: dashboards-observability
Expand Down Expand Up @@ -57,12 +57,8 @@ jobs:
- name: Get list of changed files
id: files
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD ${{ github.base_ref }}) | grep -E "\.(js|ts|tsx)$")
else
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "\.(js|ts|tsx)$")
fi
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only FETCH_HEAD...HEAD | grep -E "\.(js|ts|tsx)$")
echo "::set-output name=changed::${CHANGED_FILES}"
- name: Lint Changed Files
Expand Down

0 comments on commit 109fc25

Please sign in to comment.