mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot_merge: add sitemap params to http controllers
When it's missing, website complains because it's dumb. Fixes #763
This commit is contained in:
parent
4f237d15b0
commit
485d2d7b55
@ -11,13 +11,13 @@ from odoo.http import Controller, route, request
|
|||||||
|
|
||||||
LIMIT = 20
|
LIMIT = 20
|
||||||
class MergebotDashboard(Controller):
|
class MergebotDashboard(Controller):
|
||||||
@route('/runbot_merge', auth="public", type="http", website=True)
|
@route('/runbot_merge', auth="public", type="http", website=True, sitemap=True)
|
||||||
def dashboard(self):
|
def dashboard(self):
|
||||||
return request.render('runbot_merge.dashboard', {
|
return request.render('runbot_merge.dashboard', {
|
||||||
'projects': request.env['runbot_merge.project'].with_context(active_test=False).sudo().search([]),
|
'projects': request.env['runbot_merge.project'].with_context(active_test=False).sudo().search([]),
|
||||||
})
|
})
|
||||||
|
|
||||||
@route('/runbot_merge/<int:branch_id>', auth='public', type='http', website=True)
|
@route('/runbot_merge/<int:branch_id>', auth='public', type='http', website=True, sitemap=False)
|
||||||
def stagings(self, branch_id, until=None):
|
def stagings(self, branch_id, until=None):
|
||||||
branch = request.env['runbot_merge.branch'].browse(branch_id).sudo().exists()
|
branch = request.env['runbot_merge.branch'].browse(branch_id).sudo().exists()
|
||||||
if not branch:
|
if not branch:
|
||||||
@ -49,7 +49,7 @@ class MergebotDashboard(Controller):
|
|||||||
entries.setdefault(key, []).extend(map(item_converter, items))
|
entries.setdefault(key, []).extend(map(item_converter, items))
|
||||||
return entries
|
return entries
|
||||||
|
|
||||||
@route('/runbot_merge/changelog', auth='public', type='http', website=True)
|
@route('/runbot_merge/changelog', auth='public', type='http', website=True, sitemap=True)
|
||||||
def changelog(self):
|
def changelog(self):
|
||||||
md = markdown.Markdown(extensions=['nl2br'], output_format='html5')
|
md = markdown.Markdown(extensions=['nl2br'], output_format='html5')
|
||||||
entries = self.entries(lambda t: markupsafe.Markup(md.convert(t)))
|
entries = self.entries(lambda t: markupsafe.Markup(md.convert(t)))
|
||||||
@ -57,7 +57,7 @@ class MergebotDashboard(Controller):
|
|||||||
'entries': entries,
|
'entries': entries,
|
||||||
})
|
})
|
||||||
|
|
||||||
@route('/<org>/<repo>/pull/<int(min=1):pr>', auth='public', type='http', website=True)
|
@route('/<org>/<repo>/pull/<int(min=1):pr>', auth='public', type='http', website=True, sitemap=False)
|
||||||
def pr(self, org, repo, pr):
|
def pr(self, org, repo, pr):
|
||||||
pr_id = request.env['runbot_merge.pull_requests'].sudo().search([
|
pr_id = request.env['runbot_merge.pull_requests'].sudo().search([
|
||||||
('repository.name', '=', f'{org}/{repo}'),
|
('repository.name', '=', f'{org}/{repo}'),
|
||||||
|
Loading…
Reference in New Issue
Block a user