runbot/runbot/models/project.py
Xavier-Do fe987cd0f3 [IMP] runbot: some fixes for ps runbot
- searching on number will search for both pr and branche name
- hooks are now using payload to define repo when not given in url
- fixes .git cleaning in repo
    (remove rstrip since it can fail for repo starting with g, i, t)
- recompute base on prepare if base was not found
- remove local_result form write values if there is a single record
    (instead of raising, makes python step easier to write).
- avoid stucked build/loop after removing a step from a config.
- avoid to send ci for linked base_commit
- add a fallback mechanism for base if no master branch is found
- add option on project to avoid to keep sticky running, usefull
    when using a lots of projects
    WARNING: this is a change of default behaviour, need to update
    existing projects.
- always discover new commits for branch matching base paterns.
    This is especially usefull to discover old versions on project with
    low merge frequency.
- always create a batch, event if there is now trigger. This helps to
    notice that commits are discovered
- add line-through on death branches/pr
- manual trigger are now displayed on main page
2022-01-10 15:19:44 +01:00

22 lines
764 B
Python

from odoo import models, fields
class Project(models.Model):
_name = 'runbot.project'
_description = 'Project'
name = fields.Char('Project name', required=True, unique=True)
group_ids = fields.Many2many('res.groups', string='Required groups')
keep_sticky_running = fields.Boolean('Keep last sticky builds running')
trigger_ids = fields.One2many('runbot.trigger', 'project_id', string='Triggers')
dockerfile_id = fields.Many2one('runbot.dockerfile', index=True, help="Project Default Dockerfile")
class Category(models.Model):
_name = 'runbot.category'
_description = 'Trigger category'
name = fields.Char("Name")
icon = fields.Char("Font awesome icon")
view_id = fields.Many2one('ir.ui.view', "Link template")