File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1141,13 +1141,15 @@ def create_var(var):
11411141
11421142 # Get existing rules, None if not exist
11431143 pr = project .pushrules .get ()
1144- old_pr_dict = pr .asdict ()
11451144 if pr is None :
1145+ old_pr_dict = {}
11461146 # At least one option is required to create, use commit_committer_check
11471147 project .pushrules .create ({'commit_committer_check' : project_dict ["push_rules" ]["commit_committer_check" ]})
11481148 pr = project .pushrules .get ()
1149+ else :
1150+ old_pr_dict = pr .asdict ()
11491151
1150- # Set othe params
1152+ # Set other params
11511153 pr .commit_committer_check = project_dict ["push_rules" ]["commit_committer_check" ]
11521154 if "commit_committer_name_check" in project_dict ["push_rules" ]:
11531155 pr .commit_committer_name_check = project_dict ["push_rules" ]["commit_committer_name_check" ]
Original file line number Diff line number Diff line change 1- python-gitlab == 4.1.1
1+ python-gitlab == 4.4.0
22PyYAML == 6.0
33psycopg2-binary == 2.9.6
44#jira==2.0.0 # for jira and may be outdated
You can’t perform that action at this time.
0 commit comments