Skip to content

Commit 2536ab0

Browse files
authored
Update comment-to-commit-using-aider.yml
1 parent 8b574ef commit 2536ab0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/comment-to-commit-using-aider.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,22 @@ jobs:
3030
steps:
3131
- name: Checkout repository
3232
uses: actions/checkout@v3
33+
with:
34+
ref: ${{ github.head_ref }}
3335

3436
- name: Set up Git user configuration
3537
run: |
36-
# Configure Git with a default user for automated commit reversion
3738
git config user.name "github-actions"
3839
git config user.email "github-actions@github.com"
39-
40+
4041
- name: Revert last commit
4142
run: |
42-
# Retrieve the hash of the last commit
4343
LAST_COMMIT=$(git rev-parse HEAD)
4444
echo "Reverting commit: $LAST_COMMIT"
45-
# Revert the last commit without prompting for a commit message
4645
git revert --no-edit $LAST_COMMIT
47-
46+
4847
- name: Push changes
4948
env:
5049
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5150
run: |
52-
# Push the revert commit to the current branch
53-
git push origin HEAD:${{ github.ref }}
51+
git push origin HEAD:${{ github.head_ref }}

0 commit comments

Comments
 (0)