You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter out repositories with .batchignore at root (#509)
This implements https://github.com/sourcegraph/sourcegraph/issues/18330 by querying the locations of `.batchignore` files in each repository yielded by the `on` attribute in a batch spec. If locations were found, the repository is ignored.
This can be overwritten by using the `-force-override-ignore` flag.
Example: given my instance has the following repositories:
- `github.com/sourcegraph-testing/zap`
- `github.com/sourcegraph-testing/titan`
- `github.com/sourcegraph-testing/tidb`
- `github.com/sourcegraph-testing/etcd`
- `github.com/sourcegraph-testing/batch-changes-testing-ignore`
And I use the following batch spec:
```yaml
on:
- repositoriesMatchingQuery: repohasfile:README.md repo:sourcegraph-testing
steps:
- run: echo "a horse says 'hello'" >> README.md
container: alpine:3
```
with this change the `batch-changes-testing-ignore` repository will be ignored:
- no archive will be downloaded
- no steps executed
A message is printed that says it's ignored.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ All notable changes to `src-cli` are documented in this file.
14
14
### Added
15
15
16
16
- Extension publishing will now add a `gitHead` property to the extension's manifest. [#500](https://github.com/sourcegraph/src-cli/pull/500)
17
+
-`src batch [apply|preview]` now ignore repositories in which a `.batchignore` file exists. The `-force-override-ignore` flag can be used to turn that behaviour off. [#509](https://github.com/sourcegraph/src-cli/pull/509)
block:=out.Block(output.Line(" ", output.StyleWarning, "The repositories listed below contain .batchignore files and will be skipped. Use the -force-override-ignore flag to avoid skipping them."))
0 commit comments