Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

add or replace options names in configuration file #230

Open
marusinm opened this issue Jul 4, 2019 · 5 comments
Open

add or replace options names in configuration file #230

marusinm opened this issue Jul 4, 2019 · 5 comments

Comments

@marusinm
Copy link
Collaborator

marusinm commented Jul 4, 2019

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
Copy link
Collaborator Author

marusinm commented Jul 4, 2019

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

@lachmanfrantisek
Copy link
Member

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

@marusinm
Copy link
Collaborator Author

marusinm commented Jul 4, 2019

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.

@rpitonak
Copy link
Contributor

rpitonak commented Jul 4, 2019

  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.

@jpopelka
Copy link
Member

jpopelka commented Jul 4, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants