launchdarkly / ld-find-code-refs

Build tool for automatically sending feature flag code references to LaunchDarkly
https://launchdarkly.com
Other
46 stars 34 forks source link

[sc-135747] use go git library for all git commands #264

Closed jazanne closed 1 year ago

jazanne commented 1 year ago

Hoping that this will help in resolving issue w/new versions of git.

ERROR: 2022/08/31 18:27:52 coderefs.go:37: error parsing current commit sha: fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace
shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #135747: use go-git library for all git commands. We currently shell out in places when the library should be able to handle it.

jazanne commented 1 year ago

I can't figure out how to test that this fixes the specific issue locally, because i can't create the same issue. I tried nektos/act with this configuration, but it doesn't set the permissions for files the same way, so it doesn't throw the error.

This might need to be a test in prod situation 🙃