Package coprs :: Module forms :: Class PackageFormDistGitSimple
[hide private]
[frames] | no frames]

Class PackageFormDistGitSimple

source code


This represents basically a variant of the SCM method, but with a very trivial user interface.

Instance Methods [hide private]
 
source_json(self)
Source json stored in DB in Package.source_json
source code
 
clone_url(self)
One-time generate the clone_url from the form data
source code
 
validate(self)
Try to check that we can generate clone_url from distgit, namespace and package.
source code
Class Variables [hide private]
  distgit = DistGitSelectField()
  committish = wtforms.StringField("Committish", validators= [wt...
  namespace = wtforms.StringField("DistGit namespace", validator...
  build_requires_package_name = True

Inherited from BasePackageForm: chroot_blacklist, max_builds, package_name, package_name_regex, webhook_rebuild

Method Details [hide private]

source_json(self)

source code 

Source json stored in DB in Package.source_json

Decorators:
  • @property

validate(self)

source code 

Try to check that we can generate clone_url from distgit, namespace and package. This can not be done by single-field-context validator.


Class Variable Details [hide private]

committish

Value:
wtforms.StringField("Committish", validators= [wtforms.validators.Opti\
onal()], render_kw= {"placeholder": "Optional - Specific branch, tag, \
or commit that " "you want to build from"},)

namespace

Value:
wtforms.StringField("DistGit namespace", validators= [wtforms.validato\
rs.Optional()], default= None, filters= [lambda x: None if not x else \
os.path.normpath(x)], description= ("Some dist-git instances have the \
git repositories " "namespaced - e.g. you need to specify '@copr/copr'\
 for " "the <a href='https://copr-dist-git.fedorainfracloud.org/" "cgi\
t/@copr/copr/copr-cli.git/tree/copr-cli.spec'>" "@copr/copr/copr-cli</\
a> Fedora Copr package"), render_kw= {"placeholder": "Optional - strin\
g, e.g. '@copr/copr'"},)