31 lines
1000 B
YAML
31 lines
1000 B
YAML
name: 'Changelog Auto Add'
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, synchronize, reopened, edited]
|
|
workflow_dispatch:
|
|
inputs:
|
|
prNumber:
|
|
description: Pull request number
|
|
required: true
|
|
|
|
jobs:
|
|
add-changelog:
|
|
name: 'Add changelog to PR'
|
|
if: ${{ github.event.pull_request.user.login != 'github-actions[bot]' }}
|
|
runs-on: ubuntu-20.04
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
- name: Generate Changelog File
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
run: pnpm utils changefile ${{github.event.number || inputs.prNumber}} -o ${{ github.repository_owner }}
|