diff --git a/.github/workflows/todo-to-issue.yml b/.github/workflows/todo-to-issue.yml index 19d28846d4..517459db82 100644 --- a/.github/workflows/todo-to-issue.yml +++ b/.github/workflows/todo-to-issue.yml @@ -16,9 +16,8 @@ name: "Run TODO to Issue" on: - push: - branches: - - master + pull_request: + branches: [ "master" ] jobs: build: @@ -37,10 +36,12 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Commit and Push Changes run: | + echo "// new change" >> ground/src/main/java/com/google/android/ground/GroundApplication.kt + echo "branch " ${{ github.head_ref || github.ref_name }} 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