#14 On auto-approve, only prompt on anomalies.
Merged 4 years ago by mohanboddu. Opened 4 years ago by limb.
limb/fedscm-admin master  into  master

file modified
+1
@@ -10,3 +10,4 @@ 

  .coverage

  .vscode/

  .pytest_cache/

+ *~

file modified
+10 -4
@@ -419,7 +419,10 @@ 

                 'manually verify it.')

          click.secho(msg, fg='yellow')

  

-     action = prompt_for_ticket_action()

+     if auto_approve == False:

+         action = prompt_for_ticket_action()

+     else:

+         action = 'approve'

  

      if action == 'approve':

          # Create the PDC SLA entry
@@ -468,7 +471,7 @@ 

                                  'You may commit to the branch "{1}" in about '

                                  '10 minutes.'.format(dist_git_url,

                                                       branch_name))

-         comment_and_close_ticket(issue_id, bug_id, new_repo_comment)

+         comment_and_close_ticket(issue_id, bug_id, new_repo_comment, prompt_for_comment=False)

      elif action == 'deny':

          comment_body = click.prompt(

              'Please enter a comment explaining the denial')
@@ -561,7 +564,10 @@ 

          click.echo('    Git Branch:       {0}'.format(bool_to_word(

              create_git_branch)))

  

-         action = prompt_for_ticket_action()

+         if auto_approve == False:

+             action = prompt_for_ticket_action()

+         else:

+             action = 'approve'

  

      if action == 'approve':

          pagure_url = get_config_item(CONFIG, 'pagure_dist_git_url')
@@ -591,7 +597,7 @@ 

                  'the request, but in about 10 minutes, you may create the '

                  'branch in Pagure using git.')

          comment_and_close_ticket(issue_id, bug_id, new_branch_comment,

-                                  prompt_for_comment=not auto_approved)

+                                  prompt_for_comment=False)

      elif action == 'deny':

          comment_body = click.prompt(

              'Please enter a comment explaining the denial')

file modified
+1 -1
@@ -20,5 +20,5 @@ 

      packages=['fedscm_admin'],

      package_dir={'fedscm_admin': 'fedscm_admin'},

      url='https://pagure.io/fedscm_admin',

-     version='1.0.9',

+     version='1.0.10',

  )

.gitignore addition
Bump version.

I'm not sure if this is desired, but it's really helping me out with the golang requests. And it could be helpful for epel8.

why do we actually need this one?

Obviates the need for an expect script. So on a mass new request, we don't need to press a and Enter for each one.

Not for use in automation. . .the user should still keep an eye on that's going by.

And looking at the code, it looks like this was originally intended to some extent but not working.

rebased onto 191bf9d

4 years ago

I've been using this and it works well. Unless there are objections I'll merge tomorrow.

@limb can it wait until my #16 PR is merged and built? I will merge this PR afterwards, if that's okay with you.

rebased onto 8e5218f

4 years ago

@limb Something is wrong with the rebase, it is showing #16 PR diff.

Yes, I rebased against master after the merge. Should I not have?

@limb Something is weird as its not showing your diff, what you said is right, but something is wonky.

rebased onto 3791c24

4 years ago

Pull-Request has been merged by mohanboddu

4 years ago