Skip to content

Commit 68d51ed

Browse files
committed
updating doc
1 parent 302d3fd commit 68d51ed

1 file changed

Lines changed: 16 additions & 21 deletions

File tree

README.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ You can easily exclude repositories from the analysis, configure the files and p
2929
Several output types are available in [this package](./github-crawler-core/src/main/kotlin/com/societegenerale/githubcrawler/output/) :
3030
- console is the default and will be used if no output is configured
3131
- a simple "raw" file output
32-
- a CI-droid ready CSV (or Json) file output, to run locally and copy/paste in CI-droid bulk update UI (UI implementation is in progress)
3332
- HTTP output, which enables you to POST the results to an endpoint like ElasticSearch, for easy analysis in Kibana
33+
- some specific "CI-droid oriented" outputs, to easily "pipe" the crawler output to CI-droid
3434

3535

3636
## Configuration on crawler side
3737

38-
Several outputs can be configured at the same time. You can define as many indicators to fetch as required.
39-
40-
Below configuration shows how parsers are invoked for each indicator, thanks to the ```method``` attribute.
38+
Below configuration shows how outputs, indicators and actions are configured under the ```github-crawler``` prefix.
4139

4240
```yaml
4341
github-crawler:
@@ -109,27 +107,24 @@ github-crawler:
109107
method: findPropertyValueInYamlFile
110108
params:
111109
propertyName: "spring.application.name"
110+
111+
# We can also define a list of miscellaneous actions to perform : this includes things like various searches, ownership computation
112+
113+
misc-repository-tasks:
114+
- name: "nbOfMetricsInPomXml"
115+
#will return the number of hits returned by a search using queryString, for each repo
116+
type: "countHitsOnRepoSearch"
117+
params:
118+
queryString: "q=metrics+extension:xml"
119+
- name: "pathsWhere_ConsulCatalogWatch_IsFound"
120+
#will return the paths for each hit on th search using queryString, for each repo
121+
type: "pathsForHitsOnRepoSearch"
122+
params:
123+
queryString: "q=ConsulCatalogWatch"
112124
```
113125
114-
## Link with [CI-droid](https://github.com/societe-generale/ci-droid)
115-
116-
[CI-droid](https://github.com/societe-generale/ci-droid) is another of our tools, that can help you perform the same actions (modifying a pom.xml, replacing a string by another) in N resources, in X repositories. When there are dozens of resources to update, it can be cumbersome to prepare the message. GitHub crawler can help here, with below config :
117-
118-
```yaml
119-
outputs:
120-
ciDroidJsonReadyFile:
121-
# this should be an indicator defined in indicatorsToFetchByFile section
122-
indicatorsToOutput: "pomFilePath"
123-
124-
indicatorsToFetchByFile:
125-
"[pom.xml]":
126-
- name: "pomFilePath"
127-
method: findFilePath
128-
```
129126
130-
this will generate a file containing all the pom.xml found in the repositories (and in the branches also if ```crawlAllBranches``` is set to true), in the format that CI-droid expect.
131127
132-
All you need to do is then to copy/paste the records you want into the CI-droid bulk action Json message.
133128
134129
## Configuration on repository side
135130

0 commit comments

Comments
 (0)