#380 Always respect the value of initial_commit when creating new repo
Closed 3 months ago by zlopez. Opened 3 months ago by zlopez.
fedora-infra/ zlopez/toddlers production  into  main

@@ -715,7 +715,9 @@ 

          ) as mock_create_new_repo:

              self.toddler.process_comment(issue)

  

-             mock_create_new_repo.assert_called_with(issue, {"action": "new_repo"})

+             mock_create_new_repo.assert_called_with(

+                 issue, {"action": "new_repo"}, initial_commit=True

+             )

  

      def test_process_comment_valid_command_wrong_action(self):

          """

@@ -256,7 +256,11 @@ 

                  )

                  issue_body_json = json.loads(issue["content"].strip("`").strip("\n"))

                  if issue_body_json.get("action") == "new_repo":

-                     self._create_new_repo(issue, issue_body_json)

+                     self._create_new_repo(

+                         issue,

+                         issue_body_json,

+                         initial_commit=issue_body_json.get("initial_commit", True),

+                     )

                  else:

                      self.pagure_io.add_comment_to_issue(

                          issue["id"],

The creation of new repo behaves differently if triggered by the 'retry'
and 'valid' commands. This commit unifies the behavior.

Pull-Request has been closed by zlopez

3 months ago