Skip to content

Commit

Permalink
added codeRabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Jha committed Jan 15, 2025
1 parent 8f0cc6e commit bc8169d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ jobs:
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Check and commit pubspec.lock changes
env:
HEAD_REF: ${{ github.head_ref }}
run: |
if [[ $(git status --porcelain pubspec.lock) ]]; then
echo "Changes detected in pubspec.lock. Auto-committing updates."
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pubspec.lock
git commit -a -m "Automated update of pubspec.lock"
git push origin HEAD:${{ github.head_ref }}
git commit -a -m "chore: Auto-update pubspec.lock in PR #${{ github.event.pull_request.number }}"
if ! git push origin HEAD:"$HEAD_REF"; then
echo "Failed to push changes. Please check if you have the correct permissions."
exit 1
fi
else
echo "No changes in pubspec.lock."
fi
Expand Down

0 comments on commit bc8169d

Please sign in to comment.