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
Copy file name to clipboardExpand all lines: README.md
+16-21Lines changed: 16 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,15 +29,13 @@ You can easily exclude repositories from the analysis, configure the files and p
29
29
Several output types are available in [this package](./github-crawler-core/src/main/kotlin/com/societegenerale/githubcrawler/output/) :
30
30
- console is the default and will be used if no output is configured
31
31
- 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)
33
32
- 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
34
34
35
35
36
36
## Configuration on crawler side
37
37
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.
41
39
42
40
```yaml
43
41
github-crawler:
@@ -109,27 +107,24 @@ github-crawler:
109
107
method: findPropertyValueInYamlFile
110
108
params:
111
109
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"
112
124
```
113
125
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
-
```
129
126
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.
131
127
132
-
All you need to do is then to copy/paste the records you want into the CI-droid bulk action Json message.
0 commit comments