Skip to content

repo in detached HEAD state wasnt causing problems before #378

@gosuto-inzasheru

Description

@gosuto-inzasheru

git-auto-commit Version

v6

Machine Type

Ubuntu (eg. ubuntu-latest)

Bug description

we have this action running in two separate repos (1)(2), and in both v6 now gets stuck on:

Error: Repository is in detached HEAD state. Please make sure you check out a branch. Adjust the input accordingly.

i understand this is a feature not a bug (introduced in #357), but we never had problems before with the old version. what are we doing wrong?

Steps to reproduce

eg https://github.com/BalancerMaxis/bal_tools/actions/runs/15573050946/job/43863386559?pr=105 or https://github.com/BalancerMaxis/multisig-ops/actions/runs/15573089744/job/43852869376?pr=2113

Tried solutions

No response

Example Workflow

name: Lint

on: [pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Black
        uses: psf/black@stable
        with:
          options: "--verbose"
          version: "24.10.0"

      - name: Auto commit
        uses: stefanzweifel/git-auto-commit-action@v6.0.0
        with:
          commit_message: "style: ci lint with `black`"

Relevant log output

Repository

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions