Skip to content

Commit

Permalink
Workflow to revert any PR title edits
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 5, 2023
1 parent 2f74df7 commit a5d90c1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pr-title-edited.yml
@@ -0,0 +1,29 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Pull request title edited"

on:
pull_request_target:
types:
- edited

concurrency:
group: pr-title-edited-${{ github.head_ref }} # will be canceled on subsequent pushes in pull requests
cancel-in-progress: true

jobs:
revert-title:
name: "Revert title"
runs-on: 'ubuntu-latest'

steps:
- run: echo "${{ toJSON(github.event.changes) }}"
- uses: octokit/request-action@v2.x
with:
route: PATCH /repos/{owner}/{repo}/pulls/{pull_number}
owner: phpstan
repo: phpstan-src
pull_number: ${{ github.event.number }}
title: ${{ github.event.changes.title.from }}
env:
GITHUB_TOKEN: ${{ secrets.PHPSTAN_BOT_TOKEN }}

0 comments on commit a5d90c1

Please sign in to comment.