Skip to content

Commit

Permalink
added auto-commit back and added check in check_ignore to ignore gene…
Browse files Browse the repository at this point in the history
…rated files
  • Loading branch information
Satyam Jha committed Jan 11, 2025
1 parent 452b490 commit 520bbd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/check_ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def _check_for_ignore_directive(filePath):
if (not filePath.startswith('lib') or not filePath.endswith('.dart') or not os.path.exists(filePath)):
return False

# Exclude generated files
if 'generated' in filePath or filePath == 'lib/generated_plugin_registrant.dart':
return False

with open(filePath, "r") as file:
lines = file.readlines()

Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ jobs:
run: cd talawa_lint && flutter pub get && cd ..
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Check and commit pubspec.lock changes
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 "github-actions[bot]@users.noreply.github.com"
git add pubspec.lock
git commit -m "Automated update of pubspec.lock"
git push
else
echo "No changes in pubspec.lock."
fi
- name: Checking for correct formatting of code
run: dart format --set-exit-if-changed .
- name: setup python
Expand All @@ -58,7 +70,6 @@ jobs:
- name: Run check_ignore
run: |
git branch
git stash push -m lock_file pubspec.lock || echo "Nothing to stash"
git checkout develop
git pull
git branch
Expand Down

0 comments on commit 520bbd3

Please sign in to comment.