For some reason that I'm not entirely certain of, the default branches on my private gitlab repos get what looks like a random value:
Using the api, I can get all settings from
GET https://codecov.io/api/pub/gl/myteam/myrepo/settings
with the appropriate authentication header and token this returns:
{u'meta': {u'status': 200},
u'owner': {u'avatar_url': u'https://gitlab.com/uploads/-/system/group/avatar/123/myteam-team.png',
u'name': u'myteam',
u'remaining_credits': 4,
u'service': u'gitlab',
u'service_id': u'123',
u'students': {u'activated_count': 0, u'count': 0},
u'updatestamp': u'2020-02-23T12:41:02.301685',
u'username': u'myteam'},
u'repo': {u'activated': True,
u'active': True,
u'bot_username': None,
u'branch': u'\\x6d6173746572',
u'deleted': False,
u'image_token': u'XXXX',
u'language': None,
u'name': u'myrepo',
u'private': True,
u'service_id': u'12345',
u'updatestamp': u'2020-02-23T12:41:43.161815+00:00',
u'upload_token': u'xxxx-xxx-xxx-xxx',
u'using_integration': False}}
I have activated the repo (se the activated
and active
values under repo
above) using the example code in the docs (https://docs.codecov.io/reference#repository-settings)
POST /api/pub/gh/:owner/:repo/settings
BODY action=activate
but I haven't found a way to update an individual setting. Is this possible?