🐞 Summary
The new Prettier GitHub Action successfully runs and detects formatting issues,
but when it tries to fix and commit the changes, the commit step doesn’t complete successfully.
⚙️ Current Behavior
- The action runs Prettier correctly and identifies formatting errors.
- It formats the files locally in the CI environment.
- However, no commit is pushed back to the branch, and the PR remains unformatted.
🎯 Expected Behavior
When Prettier finds and fixes formatting issues,
it should automatically commit and push the formatted files back to the current branch.
💡 Possible Causes
- Incorrect configuration in the commit step (missing
git config user.name or git config user.email).
- It should use the user of the creating the PR
🧠 Suggested Fix
- Verify that the workflow uses a valid token with
contents: write permission.
- Add a configuration step for
git user.name and git user.email before committing.
- Optionally, test the action on a branch within the main repo instead of a fork.
✅ Goal
Ensure that the Prettier GitHub Action can automatically:
- Run
prettier --write .
- Commit the changes
- Push them to the same branch that triggered the workflow
Labels: bug, github-actions, hacktoberfest, enhancement
Difficulty: 🟡 Medium
Status: Open for contributors
🐞 Summary
The new Prettier GitHub Action successfully runs and detects formatting issues,
but when it tries to fix and commit the changes, the commit step doesn’t complete successfully.
⚙️ Current Behavior
🎯 Expected Behavior
When Prettier finds and fixes formatting issues,
it should automatically commit and push the formatted files back to the current branch.
💡 Possible Causes
git config user.nameorgit config user.email).🧠 Suggested Fix
contents: writepermission.git user.nameandgit user.emailbefore committing.✅ Goal
Ensure that the Prettier GitHub Action can automatically:
prettier --write .Labels:
bug,github-actions,hacktoberfest,enhancementDifficulty: 🟡 Medium
Status: Open for contributors