Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update todo-to-list github action to commit to PR instead of master branch #2943

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/todo-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@

name: "Run TODO to Issue"
on:
push:
branches:
- replace-with-master-when-fixed
pull_request_review:
types:
- submitted

jobs:
build:
run-on-approval:
if: ${{ github.event.review.state == 'approved' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ref: ${{ github.head_ref }}
- name: "TODO to Issue"
uses: alstr/[email protected]
with:
Expand All @@ -35,14 +37,14 @@ jobs:
CLOSE_ISSUES: "true"
- name: Set Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name ${{ github.actor }}
git config --global user.email `git log -n 1 --pretty=format:%ae remotes/origin/${{ github.head_ref }}`
- name: Commit and Push Changes
run: |
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import androidx.multidex.MultiDexApplication
import androidx.work.Configuration
import com.google.android.ground.Config.isReleaseBuild
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject
import timber.log.Timber
import javax.inject.Inject

@HiltAndroidApp
class GroundApplication : MultiDexApplication(), Configuration.Provider {
Expand Down
Loading