Skip to content

Git diff --stat call doesn't implement working-dir, leading to git diff error #49

@Arkessler

Description

@Arkessler

It looks like the git diff --stat call in the "check workspace" step doesn't use the working-dir input arg.

https://github.com/chainguard-dev/digestabot/blob/main/action.yml#L120

When running digestabot with our monorepo checked out in $GITHUB_WORKSPACE/my_repo, it returns the following error

      - uses: chainguard-dev/[email protected]
        with:
          token: ${{ steps.generate-token.outputs.token }}
          working-dir: $GITHUB_WORKSPACE/my_repo
Run git diff --stat
warning: Not a git repository. Use --no-index to compare two paths outside a working tree
usage: git diff --no-index [<options>] <path> <path>
Diff output format options
    -p, --patch           generate patch
    -s, --no-patch        suppress diff output
   ....

This may also be the case with the "Create Pull Request" step, since that step doesn't set a path input on the peter-evans action:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions