| |
@@ -372,6 +372,13 @@
|
| |
'--no-initial-commit',
|
| |
action='store_true',
|
| |
help='Do not include an initial commit in the repository.')
|
| |
+ packit_onboarding_choices = ['no', 'pull-request', 'push']
|
| |
+ request_repo_parser.add_argument(
|
| |
+ '--onboard-packit',
|
| |
+ help='Whether to generate a default Packit configuration '
|
| |
+ 'for the package and open a pull request against or push '
|
| |
+ 'directly to the newly created dist-git repository',
|
| |
+ choices=packit_onboarding_choices, default=packit_onboarding_choices[0])
|
| |
request_repo_parser.set_defaults(command=self.request_repo)
|
| |
|
| |
def register_request_tests_repo(self):
|
| |
@@ -970,6 +977,7 @@
|
| |
name=self.name,
|
| |
config=self.config,
|
| |
initial_commit=not self.args.no_initial_commit,
|
| |
+ onboard_packit=self.args.onboard_packit,
|
| |
)
|
| |
|
| |
def request_tests_repo(self):
|
| |
@@ -988,7 +996,7 @@
|
| |
def _request_repo(logger, repo_name, ns, description, name, config,
|
| |
branch=None, summary=None, upstreamurl=None,
|
| |
monitor=None, bug=None, exception=None, anongiturl=None,
|
| |
- initial_commit=True):
|
| |
+ initial_commit=True, onboard_packit=None):
|
| |
""" Implementation of `request_repo`.
|
| |
|
| |
Submits a request for a new dist-git repo.
|
| |
@@ -1023,6 +1031,11 @@
|
| |
`self.args.exception`.
|
| |
:param anongiturl: A string with the name of the anonymous git url.
|
| |
Typically the value of `self.cmd.anongiturl`.
|
| |
+ :param onboard_packit: A string, whether to generate a default
|
| |
+ Packit configuration for the package and open a pull request
|
| |
+ against or push directly to the newly created dist-git repository.
|
| |
+ Accepted values are `no`, `pull-request` and `push`.
|
| |
+ Typically takes the value of `self.args.onboard_packit`.
|
| |
:return: None
|
| |
"""
|
| |
|
| |
@@ -1058,6 +1071,7 @@
|
| |
'bug_id': bug or '',
|
| |
'monitor': 'no-monitoring',
|
| |
'namespace': 'tests',
|
| |
+ 'onboard_packit': 'no',
|
| |
'repo': repo_name,
|
| |
'description': description,
|
| |
'upstreamurl': '',
|
| |
@@ -1074,6 +1088,7 @@
|
| |
'exception': exception,
|
| |
'monitor': monitor,
|
| |
'namespace': ns,
|
| |
+ 'onboard_packit': onboard_packit,
|
| |
'repo': repo_name,
|
| |
'summary': summary or summary_from_bug,
|
| |
'upstreamurl': upstreamurl or ''
|
| |
@@ -1279,6 +1294,7 @@
|
| |
exception=True,
|
| |
name=name,
|
| |
config=config,
|
| |
+ onboard_packit='no',
|
| |
)
|
| |
fedpkgClient._request_branch(
|
| |
logger=logger,
|
| |
This is part of this Fedora change: https://fedoraproject.org/wiki/Changes/AutomatedPackitOnboarding