Skip to content

Chore(deps-dev): Bump @trivago/prettier-plugin-sort-imports from 4.3.0 to 5.1.0 #45

Chore(deps-dev): Bump @trivago/prettier-plugin-sort-imports from 4.3.0 to 5.1.0

Chore(deps-dev): Bump @trivago/prettier-plugin-sort-imports from 4.3.0 to 5.1.0 #45

Workflow file for this run

name: Validate
on:
pull_request:
types:
- opened
- synchronize
permissions: write-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_stability:
name: Check stability
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Run lint & test
run: |
npm run lint
npm run test
- name: Comment on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ [**Failure**] Run lint & test'
});
merge_with_comment:
needs: check_stability
name: Merge with comment
runs-on: ubuntu-latest
if: success()
steps:
- name: Merge pull request
id: merge
uses: actions/github-script@v7
with:
script: |
try {
const pullRequest = context.payload.pull_request;
const repository = context.payload.repository;
github.rest.pulls.merge({
merge_method: 'squash',
owner: repository.owner.login,
pull_number: pullRequest.number,
repo: repository.name
});
return "success";
} catch {
return "failure";
}
- name: Setup comment message
id: comment
run: |
merge_result=${{ steps.merge.outputs.result }}
message="Merge pull request!"
if [ "$merge_result" == "success" ]; then
message="✅ [**Success**] $message"
else
message="❌ [**Failure**] $message"
fi
echo "message=$message" >> $GITHUB_OUTPUT
- name: Comment on pull request
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ steps.comment.outputs.message }}'
});