[EngSys] added to python script to not fail if there is an existing PR#18397
[EngSys] added to python script to not fail if there is an existing PR#18397seankane-msft wants to merge 1 commit intoAzure:masterfrom
Conversation
|
|
||
|
|
||
| def check_diff(folder): | ||
| def check_for_open_pr(service_directory): |
There was a problem hiding this comment.
You shouldn't need to do this if your branch name is consistent. As the create-pull-request template will not create an additional PR against a given branch if one already exists. That is how we generally handle this case in other places.
There was a problem hiding this comment.
That is great to know, I can close this PR entirely then
| return False | ||
|
|
||
|
|
||
| def check_diff(folder, service_dir): |
There was a problem hiding this comment.
Similar you shouldn't need to manually do a git diff. See https://github.com/Azure/azure-sdk-for-python/blob/master/eng/common/pipelines/templates/steps/git-push-changes.yml#L18
There was a problem hiding this comment.
The git diff is for users to be able to inspect which files are different in the pipeline on a failure.
There was a problem hiding this comment.
OK if that is interesting for other cases that is fine. However I'd encourage you to do those type of command line calls inline script blocks in the yml file, unless you feel folks would want to run them locally as well.
This is perhaps my preference for using a shell scripting language (script/bash/pwsh) when running command line tools as opposed to wrapping them in process calls in a higher level language like python. Just something to keep in mind not something that is necessarily actionable. :)
This PR adds to the
verify_autorest.pyfile to only fail if the autorest is not the same AND there is not an existing PR out for autorest generation.