From 7ffd23131bba201d3d80073fd62c0311b71b4bbf Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 14 Sep 2023 09:39:21 +0000 Subject: [PATCH] ci: add workflow to handle release PR edit --- .../handle-release-pr-title-edit.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/handle-release-pr-title-edit.yml 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 0000000..86f5518 --- /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 == 'lithic-com/lithic-go' + 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 }}