Skip to content

Commit

Permalink
[task_enrich] Fix git pair-programming activation
Browse files Browse the repository at this point in the history
This fixes when the name of the data source to enable
pair-programming contains a tag like `[git:pair]`.

The current behavior only works if the data source is `[git]`.

Signed-off-by: Quan Zhou <quan@bitergia.com>
  • Loading branch information
zhquan committed Jun 29, 2022
1 parent 9af1d23 commit c73470d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: '[git] pair-programming activation fixed'
category: fixed
author: Quan Zhou <quan@bitergia.com>
issue: null
notes: >
Git pair-programming can be activated if the data source
contains a tag like `[git:pair]`
5 changes: 3 additions & 2 deletions sirmordred/task_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ def __enrich_items(self):
github_token = None
pair_programming = False
node_regex = None
if 'git' in cfg and 'pair-programming' in cfg['git']:
pair_programming = cfg['git']['pair-programming']

if self.backend_section in cfg and 'pair-programming' in cfg[self.backend_section]:
pair_programming = cfg[self.backend_section]['pair-programming']
if 'jenkins' in cfg and 'node_regex' in cfg['jenkins']:
node_regex = cfg['jenkins']['node_regex']
only_studies = False
Expand Down

0 comments on commit c73470d

Please sign in to comment.