diff --git a/.github/workflows/todo-to-issue.yml b/.github/workflows/todo-to-issue.yml index 5d34f6381b..a2a6c8c3b4 100644 --- a/.github/workflows/todo-to-issue.yml +++ b/.github/workflows/todo-to-issue.yml @@ -17,8 +17,9 @@ name: "Run TODO to Issue" on: push: - branches: - - master + branches: [ "master" ] + pull_request: + branches: [ "master" ] jobs: build: @@ -26,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} - name: "TODO to Issue" uses: alstr/todo-to-issue-action@v5.1.7 with: @@ -42,7 +43,7 @@ jobs: git add -A if [[ `git status --porcelain` ]]; then git commit -m "Automatically added GitHub issue links to TODOs" - git push origin master + git push origin ${{ github.head_ref }} else echo "No changes to commit" fi \ No newline at end of file