Skip to content

chore(deps): ⬆️ bump tough-cookie from 4.0.0 to 4.1.3 #705

chore(deps): ⬆️ bump tough-cookie from 4.0.0 to 4.1.3

chore(deps): ⬆️ bump tough-cookie from 4.0.0 to 4.1.3 #705

name: 'enhance deps PR'
on:
pull_request_target:
types: [labeled]
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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:
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