release-bot
release-bot copied to clipboard
add or replace options names in configuration file
Related to #190
In conf.yaml
we have options like github_token
, github_username
or clone_url
.
Now, when we started to replace Github API calls with ogr. Release bot will be available also for Pagure. What can we do with conf file:
-
We add new options to the configuration file like
pagure_token
,pagure_username
,github_clone_url
andpagure_clone_url
. -
Or we replace original names just for
git_token
,git_username
,clone_url
.
The first one is more obvious. The second one gets rid of redundant options in configuration - one option for Github and Pagure.
Also, we should consider which options in conf.yaml
will be required and which optional after ogr will be implemented.
From the perspective of ogr, you can use both ways:
get_project(url=clone_url, token=git_token)
get_project(url=clone_url, custom_instances=[PagureService(token=pagure_token, instance_url="pagure.io"), GithubService(token=github_token)])
Yes, the usage of ogr is clear to me.
One of my points is option clone_url
, since it is not required in conf.yaml
. However, it is still created from github.com string. It is not a problem to create clone_url
from pagure.io or src.fedoraproject.org strings as well.
I'm just asking if I can replace option clone_url
with github_clone_url
and pagure_clone_url
in conf.yaml
. Because there is no way how to find out which Pagure base urls should be used and it should be added explicitly by a user.
My question is only about the naming of various options in conf.yaml
and which ones should be required. But I can implement what I think is best and we can discuss in PR when you see the solution.
- Or we replace original names just for
git_token
,git_username
,clone_url
.
I would go for this option since in most cases you will be doing releases of one project just from one repository - either GitHub or pagure.
In the future, when one instance of RB will be able to handle more projects this could be solved just by adding the second repo to the configuration as well.
I'm just asking if I can replace option
clone_url
withgithub_clone_url
andpagure_clone_url
inconf.yaml
yes
But I can implement what I think is best and we can discuss in PR when you see the solution.
+1