`.nx/` makes all-contributors plugin think info has changed, crashes pipeline
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I am unable to find any mentions of `nx` in this repo (the private repo this is failing on doesn't use `nx`), but for some reason, a `.nx/` folder is being added when I use `yarn auto shipit -vv` on our `master` branch, which runs the all-contributors plugin. As far as I can tell, it's not coming from our end, because we don't use `nx` AND we run `git reset --hard` right before calling `auto`.
Re: [this discussion](https://github.com/nrwl/nx/discussions/20605#discussion-5930428), when working with `nx` >= 17, the `.nx/` folder has been moved from `node_modules/.cache` to the workspace root. This is causing `changedFiles` in the code below to be true, which makes the plugin think that the README and .all-contributorsrc have been updated. The plugin tries to commit these files and errors out because those files actually have not changed.
https://github.com/intuit/auto/blob/335fadb33fc1b661faa2a82a1d992b0e81036a74/plugins/all-contributors/src/index.ts#L360-L366
Here is the error shown with `-vv`
```
The following paths are ignored by one of your .gitignore files:
fastlane/README.md
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
fatal: pathspec '**/.all-contributorsrc' did not match any files
On branch master
Untracked files:
(use "git add ..." to include in what will be committed)
.nx/
nothing added to commit but untracked files present (use "git add" to track)
Error: Running command 'git' with args [commit, --no-verify, -m, "Update contributors [skip ci]"] failed
On branch master
Untracked files:
(use "git add ..." to include in what will be committed)
.nx/
nothing added to commit but untracked files present (use "git add" to track)
```
**To Reproduce**
I will try to reproduce this with a small repo. TBD.
**Expected behavior**
I expect `auto` to:
1. not crash my pipeline
2. gracefully handle it when a user has not meet any new contribution criteria and `shipit` is called on `master`
**Environment information:**
```txt
Environment Information:
"auto" version: v11.0.1
"git" version: v2.39.3 (Apple Git-145)
"node" version: v16.20.2
GHE version: v3.10.8
```
**Additional Context**
* I was able to workaround this on our pipeline by adding `.nx/` to our `.gitignore`.
* We don't use `.nx/` in the repo this issue was discovered on, so not sure where it's coming from
* This issue is happening for `master` but not for other branches. I didn't test `next`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.