stevenbooke commented on code in PR #13842:
URL: https://github.com/apache/kafka/pull/13842#discussion_r1291838865


##########
refresh-collaborators.py:
##########
@@ -59,9 +64,20 @@
 yaml_content["github"]["collaborators"] = collaborators
 
 # Convert the updated content back to YAML
-updated_yaml = yaml.safe_dump(yaml_content)
+updated_yaml = io.StringIO()
+yml.dump(yaml_content, updated_yaml)
+updated_yaml_str = updated_yaml.getvalue()
 
-# Commit and push the changes
+# Create a new branch for the changes
+new_branch_name = "update-asf.yaml-github-whitelist-and-collaborators"

Review Comment:
   @mimaison If the PR is merged the branch will not be deleted. 
   
   I have updated the script to check if branch already exists. If so, the 
script will commit the changes to the branch, and open a pull request with the 
updated `.asf.yaml` file. Otherwise, the script will create a new branch for 
the changes, commit the changes to the new branch, and open a pull request with 
the updated `.asf.yaml` file.
   
   Here is an example of what happens if changes are made to a branch that 
already has a pull request opened and merged:
   
   A pull request is opened for the branch.
   The pull request is merged.
   Changes are made to the branch.
   Another pull request is opened for the branch.
   The second pull request will be based on the latest commit on the branch, 
which will include all of the changes that have been made to the branch since 
the first pull request was merged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to