diff --git a/.github/workflows/handle-release-pr-title-edit.yml b/.github/workflows/handle-release-pr-title-edit.yml new file mode 100644 index 00000000..d1e84b42 --- /dev/null +++ b/.github/workflows/handle-release-pr-title-edit.yml @@ -0,0 +1,23 @@ +name: Handle release PR title edits +on: + pull_request: + types: + - edited + - unlabeled + +jobs: + update_pr_content: + name: Update pull request content + if: | + (github.event.type == 'edited' && github.event.changes.title.from != github.event.pull_request.title) || + (github.event.type == 'unlabeled' && github.event.label.name == 'autorelease: custom version') && + github.event.pull_request.state == 'open' && + github.event.sender.login != 'stainless-bot' && + github.repository == 'Finch-API/finch-api-python' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: stainless-api/trigger-release-please@v1 + with: + repo: ${{ github.event.repository.full_name }} + stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}