Example #1
0
class BitbucketConfigForm(wtf.Form):
    branches = wtf.TextField(
        'Branches',
        validators=[wtf.Optional(), wtf.Length(max=1024)],
        description=(
            'A comma-seperated list of branches to forward, or blank for all.'
            ' Ex: "master, dev"'))
    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include minor mIRC coloring.'))
    show_branch = wtf.BooleanField(
        'Show Branch Names',
        validators=[wtf.Optional()],
        default=True,
        description=('If checked, show the branch for a commit.'))
    show_raw_author = wtf.BooleanField(
        'Show Raw Author',
        validators=[wtf.Optional()],
        default=False,
        description=(
            'If checked, shows the raw author for a commit. For example,'
            ' <code>Tyler Kennedy &lt;[email protected]&gt;</code> instead of'
            ' <code>TkTech</code>.'))
Example #2
0
class JIRAConfigForm(wtf.Form):
    use_colors = wtf.BooleanField('Use Colors', validators=[
        wtf.Optional()
    ], default=True, description=(
        'If checked, messages will include minor mIRC coloring.'
    ))
    prefer_username = wtf.BooleanField('Prefer Usernames', validators=[
        wtf.Optional()
    ], default=True, description=(
        'If checked, prefer displaying JIRA account names instead of'
        ' full names.'
    ))
Example #3
0
class AppVeyorConfigForm(wtf.Form):
    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include minor mIRC coloring.'))
Example #4
0
class ChannelDetailsForm(wtf.Form):
    channel = wtf.TextField(
        'Channel', validators=[wtf.Required(),
                               wtf.Length(min=1, max=80)])
    host = wtf.TextField(
        'Host',
        validators=[wtf.Required(), wtf.Length(min=1, max=255)],
        default='chat.freenode.net')
    port = wtf.IntegerField('Port',
                            validators=[wtf.NumberRange(1024, 66552)],
                            default=6667)
    ssl = wtf.BooleanField('Use SSL', default=False)
    public = wtf.BooleanField(
        'Public',
        default=True,
        description=('Allow others to see that this channel exists.'))
Example #5
0
class GithubForm(wtf.Form):
    update_projects = wtf.BooleanField('Update Projects', default=True,
        description=(
            'If a project already exists, update it instead of skipping it.'
    ))
    set_hooks = wtf.BooleanField('Set Hooks', default=False, description=(
        'Sets up each project you select with Github web hooks, so that they'
        ' start recieving commits immediately.'
    ))
    set_commits = wtf.BooleanField('Add to #commits', default=True,
        description=(
            'Sets up public projects you select to broadcast to #commits'
            ' on chat.freenode.net as a default channel (you can always remove'
            ' it later).'
        )
    )
Example #6
0
class ProjectDetailsForm(wtf.Form):
    name = wtf.TextField(
        'Project Name',
        validators=[
            wtf.Required(),
            wtf.Length(1, 50),
            wtf.Regexp(
                r'^[a-zA-Z0-9_\-\.]*$',
                message=(
                    'Project name must only contain a to z, 0 to 9, dashes'
                    ' and underscores.'))
        ])
    public = wtf.BooleanField('Public', validators=[], default=True)
    website = wtf.TextField('Project URL',
                            validators=[
                                wtf.Optional(),
                                wtf.Length(max=1024),
                                wtf.validators.URL()
                            ])
Example #7
0
class JenkinsConfigForm(wtf.Form):
    phase = wtf.SelectMultipleField(
        'Phase',
        default=['finalized'],
        choices=[('started', 'Started'), ('completed', 'Completed'),
                 ('finalized', 'Finalized')],
        description=('Print messages for selected fields.'))

    status = wtf.SelectMultipleField(
        'Status',
        default=['success', 'unstable', 'failure'],
        choices=[('success', 'Success'), ('unstable', 'Unstable'),
                 ('failure', 'Failure')],
        description=('Print messages for selected fields.'))

    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=('If checked, messages will include minor mIRC coloring.'))
Example #8
0
class TravisConfigForm(wtf.Form):
    gh_user = wtf.TextField(
        'GitHub username',
        validators=[wtf.Required(), wtf.Length(max=40)],
        description=('Case-sensitive GitHub username of repository owner.'))
    repo_name = wtf.TextField(
        'Repo name',
        validators=[wtf.Required(), wtf.Length(max=100)],
        description=('Case-sensitive name of repository.'))
    token = wtf.TextField(
        'Travis Token',
        validators=[wtf.Required(), wtf.Length(max=1024)],
        description=
        ('Used to authenticate incoming webhooks.<br>'
         'Can be found on your '
         '<a href="https://travis-ci.org/profile/">Travis CI profile page</a>.'
         ))
    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include minor mIRC coloring.'))
Example #9
0
class GitlabConfigForm(wtf.Form):
    branches = wtf.TextField(
        'Branches',
        validators=[wtf.Optional(), wtf.Length(max=1024)],
        description=(
            'A comma-separated of branches to forward, or blank for all.'
            ' Ex: "master, dev"'))
    events = EventSelectField(
        'Events',
        choices=[('commit_comment', 'Commit comment'),
                 ('snippet_comment', 'Snippet comment'),
                 ('pipeline_created', 'Pipeline status: created'),
                 ('pipeline_pending', 'Pipeline status: pending'),
                 ('pipeline_running', 'Pipeline status: running'),
                 ('pipeline_failed', 'Pipeline status: failed'),
                 ('pipeline_success', 'Pipeline status: success'),
                 ('pipeline_canceled', 'Pipeline status: canceled'),
                 ('pipeline_skipped', 'Pipeline status: skipped'),
                 ('build_created', 'Build status: created'),
                 ('build_pending', 'Build status: pending'),
                 ('build_running', 'Build status: running'),
                 ('build_failed', 'Build status: failed'),
                 ('build_success', 'Build status: success'),
                 ('build_canceled', 'Build status: canceled'),
                 ('build_skipped', 'Build status: skipped'),
                 ('create_branch', 'Create branch'),
                 ('create_tag', 'Create tag'),
                 ('delete_branch', 'Delete branch'),
                 ('delete_tag', 'Delete tag'),
                 ('issue_comment', 'Issue comment'),
                 ('issue_close', 'Issue: closed'),
                 ('issue_update', 'Issue: updated'),
                 ('issue_open', 'Issue: opened'),
                 ('issue_reopen', 'Issue: reopened'),
                 ('mr_comment', 'Merge request comment'),
                 ('mr_close', 'Merge request: closed'),
                 ('mr_update', 'Merge request: updated'),
                 ('mr_open', 'Merge request: opened'),
                 ('mr_reopen', 'Merge request: reopened'),
                 ('mr_merge', 'Merge request: merged'), ('push', 'Push'),
                 ('wiki_create', 'Wiki: created page'),
                 ('wiki_edit', 'Wiki: edited page')])
    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include minor mIRC coloring.'))
    show_branch = wtf.BooleanField(
        'Show Branch Name',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include the branch name.'))
    show_tags = wtf.BooleanField(
        'Show Tags',
        validators=[wtf.Optional()],
        default=True,
        description=('If checked, changes to tags will be shown.'))
    full_project_name = wtf.BooleanField(
        'Full Project Name',
        validators=[wtf.Optional()],
        default=False,
        description=
        ('If checked, show the full gitlab project name (ex: tktech/notifico)'
         ' instead of the Notifico project name (ex: notifico)'))
    title_only = wtf.BooleanField(
        'Title Only',
        validators=[wtf.Optional()],
        default=False,
        description=(
            'If checked, only the commits title (the commit message up to'
            ' the first new line) will be emitted.'))
Example #10
0
class GithubConfigForm(wtf.Form):
    branches = wtf.TextField(
        'Branches',
        validators=[wtf.Optional(), wtf.Length(max=1024)],
        description=(
            'A comma-separated list of branches to forward, or blank for all.'
            ' Ex: "master, dev"'))
    events = EventSelectField(
        'Events',
        choices=[
            ('commit_comment_created', 'Commit comment'),
            ('status_error', 'Commit status: error'),
            ('status_failure', 'Commit status: failure'),
            ('status_pending', 'Commit status: pending'),
            ('status_success', 'Commit status: success'),
            ('create_branch', 'Create branch'),
            ('create_tag', 'Create tag'),
            ('delete_branch', 'Delete branch'),
            ('delete_tag', 'Delete tag'),
            ('issue_comment_created', 'Issue comment'),
            ('issue_comment_deleted', 'Issue comment: deleted'),
            ('issue_comment_edited', 'Issue comment: edited'),
            ('issue_assigned', 'Issue: assigned'),
            ('issue_closed', 'Issue: closed'),
            ('issue_edited', 'Issue: edited'),
            ('issue_labeled', 'Issue: labeled'),
            ('issue_opened', 'Issue: opened'),
            ('issue_reopened', 'Issue: reopened'),
            ('issue_unassigned', 'Issue: unassigned'),
            ('issue_unlabeled', 'Issue: unlabeled'),
            ('pr_review_created', 'Pull request review comment'),
            ('pr_review_deleted', 'Pull request review comment: deleted'),
            ('pr_review_edited', 'Pull request review comment: edited'),
            ('pr_assigned', 'Pull request: assigned'),
            ('pr_closed', 'Pull request: closed'),
            ('pr_edited', 'Pull request: edited'),
            ('pr_labeled', 'Pull request: labeled'),
            ('pr_opened', 'Pull request: opened'),
            ('pr_reopened', 'Pull request: reopened'),
            ('pr_synchronize', 'Pull request: synchronize'),
            ('pr_unassigned', 'Pull request: unassigned'),
            ('pr_unlabeled', 'Pull request: unlabeled'),
            ('push', 'Push'),
            ('release_published', 'Release published'),
            ('member_added', 'Repo: added collaborator'),
            ('team_add', 'Repo: added to a team'),
            ('fork', 'Repo: forked'),
            ('public', 'Repo: made public'),
            ('watch_started', 'Repo: starred'),
            ('gollum_created', 'Wiki: created page'),
            ('gollum_edited', 'Wiki: edited page'),
        ])
    use_colors = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include minor mIRC coloring.'))
    show_branch = wtf.BooleanField(
        'Show Branch Name',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, commit messages will include the branch name.'))
    show_tags = wtf.BooleanField(
        'Show Tags',
        validators=[wtf.Optional()],
        default=True,
        description=('If checked, changes to tags will be shown.'))
    prefer_username = wtf.BooleanField(
        'Prefer Usernames',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'If checked, show github usernames instead of commiter name when'
            ' possible.'))
    full_project_name = wtf.BooleanField(
        'Full Project Name',
        validators=[wtf.Optional()],
        default=False,
        description=
        ('If checked, show the full GitHub project name (ex: notifico/notifico)'
         ' instead of the Notifico project name (ex: notifico)'))
    title_only = wtf.BooleanField(
        'Title Only',
        validators=[wtf.Optional()],
        default=False,
        description=(
            'If checked, only the commits title (the commit message up to'
            ' the first new line) will be emitted.'))
    distinct_only = wtf.BooleanField(
        'Distinct Commits Only',
        validators=[wtf.Optional()],
        default=True,
        description=(
            'Commits will only be announced the first time they are seen.'))
Example #11
0
class PlainTextConfigForm(wtf.Form):
    use_colours = wtf.BooleanField(
        'Use Colors',
        validators=[wtf.Optional()],
        default=False,
        description=('If checked, messages will include mIRC colouring.'))