#212 discussions: fix configurable BBA URL in ticket description
Merged 2 years ago by kparal. Opened 2 years ago by kparal.

file modified
+2 -2
@@ -66,7 +66,7 @@ 

      PAGURE_DISCUSSION_TITLE = "[$component] $summary | rhbz#$bugid"

      PAGURE_DISCUSSION_CONTENT = '''\

  Bug details: ** $bug_url **

- Information from [BlockerBugs App]({}):

+ Information from [BlockerBugs App]($blockerbugs_url):

  ![$bugid]($bug_img)

  #### Current vote summary

  $vote_summary
@@ -76,7 +76,7 @@ 

  A quick example: `BetaBlocker +1` (where the tracker name is one of \

  `BetaBlocker`/`FinalBlocker`/`BetaFE`/`FinalFE`/`0Day`/`PreviousRelease` \

  and the vote is one of `+1`/`0`/`-1`)

- '''.format(BLOCKERBUGS_URL)

+ '''

  

  

  class ProductionConfig(Config):

@@ -149,6 +149,7 @@ 

  

  def render_discussion_template(template, bug, vote_summary='Nobody voted yet.'):

      rendered = Template(template).substitute(

+         blockerbugs_url=app.config['BLOCKERBUGS_URL'],

          bug_img=f"{app.config['BLOCKERBUGS_API']}bugimg/{bug.bugid}",

          bug_url=bug.url,

          bugid=bug.bugid,

The URL was supposed to be configurable, but wasn't, because the URL was baked
into the ticket template during initial startup and the BLOCKERBUGS_URL config
option no longer affected it. This fixes it.

Related: https://pagure.io/fedora-qa/blockerbugs/issue/192

Build succeeded.

Commit 1f2ecc9 fixes this pull-request

Pull-Request has been merged by kparal

2 years ago