Skip to content

chore(deps): ⬆️ bump ws from 8.13.0 to 8.14.0 #332

chore(deps): ⬆️ bump ws from 8.13.0 to 8.14.0

chore(deps): ⬆️ bump ws from 8.13.0 to 8.14.0 #332

name: 'enhance deps PR'
on:
pull_request_target:
types: [labeled]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
run:
name: enhance deps PR
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'dependencies')
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Echo PR information
run: |
echo "[info] PR number: ${{ github.event.pull_request.number }}"
echo "[info] PR title: ${{ github.event.pull_request.title }}"
echo "[info] head ref: ${{ github.head_ref }}"
- name: Check PR context
id: check
run: |
echo "${{ github.event.pull_request.title }}" | \
sed -e "s/^chore.*: \(.*\)/\1/" | \
sed -e "s/^/chore(deps): ⬆️ /" | \
xargs echo "::set-output name=title::$1"
git log --pretty=format:"%b" -1 | \
xargs echo "::set-output name=body::$1"
- name: Enhance PR title
env:
number: ${{ github.event.pull_request.number }}
title: ${{ steps.check.outputs.title }}
run: |
gh pr edit ${{ env.number }} --title "${{ env.title }}"
- name: Enhance PR commit message
env:
number: ${{ github.event.pull_request.number }}
title: ${{ steps.check.outputs.title }}
body: ${{ steps.check.outputs.body }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit --amend -m "${{ env.title }}" -m "${{ env.body }}"
git push -f