-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 4.10.0 into master > [!CAUTION] > Merge PR strategy: Create a merge commit
- Loading branch information
Showing
389 changed files
with
7,651 additions
and
76,084 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Prettier | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
prettier: | ||
name: Ensure the code format on the changed files | ||
runs-on: ubuntu-latest | ||
steps: | ||
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file | ||
- name: Install NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Verify the changed files | ||
run: | | ||
REMOTE_NAME=origin | ||
echo "Base ref: $GITHUB_BASE_REF" | ||
echo "Head ref: $GITHUB_HEAD_REF" | ||
echo "Fetching branch: $GITHUB_BASE_REF" | ||
git fetch origin $GITHUB_BASE_REF | ||
echo "Fetching branch: $GITHUB_HEAD_REF" | ||
git fetch origin $GITHUB_HEAD_REF | ||
echo "Listing branches" | ||
git branch -a | ||
echo "Getting diff files ignoring deleted and getting the changed or renamed files" | ||
CHANGED_FILES=$(git diff --name-status --diff-filter d ${REMOTE_NAME}/${GITHUB_BASE_REF}..${REMOTE_NAME}/${GITHUB_HEAD_REF} | awk '{print $2}') | ||
echo "Changed files:" | ||
echo "${CHANGED_FILES}" | ||
git checkout $GITHUB_HEAD_REF | ||
plugin_package_json=$(ls -d plugins/* | head -n1) | ||
echo "Installing dependencies from plugin: ${plugin_package_json}" | ||
yarn --cwd "${plugin_package_json}" --modules-folder ../../node_modules | ||
echo "Running prettier on the changed files" | ||
npx prettier ${CHANGED_FILES} --check --ignore-unknown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.