]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Add git repo info to coveralls payload 2595/head
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 16 Oct 2018 01:01:58 +0000 (21:01 -0400)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 16 Oct 2018 01:01:58 +0000 (21:01 -0400)
Again other implementations were used as reference, because API is not
fully documented.

test/functional/util/merge_coveralls.py

index b19aa383b5e1bbf44fd45dbf4800716310155e25..c3976b48f0a49974d7c7a06f2fe5afeec5aab91f 100755 (executable)
@@ -141,6 +141,20 @@ if __name__ == '__main__':
             j1['commit_sha'] = os.getenv('CI_COMMIT_SHA')
             if os.getenv('CI_BUILD_EVENT') == 'pull_request':
                 j1['service_pull_request'] = os.getenv('CI_PULL_REQUEST')
+            # git data can be filled by cpp-coveralls, but in our layout it can't find repo
+            # so we can override git info witout merging
+            j1['git'] = {
+                'head': {
+                    'id': j1['commit_sha'],
+                    'author_email': os.getenv('CI_COMMIT_AUTHOR_EMAIL'),
+                    'message': os.getenv('CI_COMMIT_MESSAGE')
+                },
+                'branch': j1['service_branch'],
+                'remotes': [{
+                    'name': 'origin',
+                    'url': os.getenv('CI_REPO_REMOTE')
+                }]
+            }
 
 
     j1['source_files'] = list(files.values())