release-bot icon indicating copy to clipboard operation
release-bot copied to clipboard

add or replace options names in configuration file

Open marusinm opened this issue 5 years ago • 5 comments

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:

  1. We add new options to the configuration file like pagure_token, pagure_username, github_clone_url and pagure_clone_url.

  2. 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.

marusinm avatar Jul 04 '19 08:07 marusinm

Also, we should consider which options in conf.yaml will be required and which optional after ogr will be implemented.

marusinm avatar Jul 04 '19 08:07 marusinm

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)])

lachmanfrantisek avatar Jul 04 '19 08:07 lachmanfrantisek

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.

marusinm avatar Jul 04 '19 09:07 marusinm

  1. 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.

rpitonak avatar Jul 04 '19 10:07 rpitonak

I'm just asking if I can replace option clone_url with github_clone_url and pagure_clone_url in conf.yaml

yes

But I can implement what I think is best and we can discuss in PR when you see the solution.

+1

jpopelka avatar Jul 04 '19 14:07 jpopelka