Skip to content

Comments

[EngSys] added to python script to not fail if there is an existing PR#18397

Closed
seankane-msft wants to merge 1 commit intoAzure:masterfrom
seankane-msft:github-script
Closed

[EngSys] added to python script to not fail if there is an existing PR#18397
seankane-msft wants to merge 1 commit intoAzure:masterfrom
seankane-msft:github-script

Conversation

@seankane-msft
Copy link
Contributor

This PR adds to the verify_autorest.py file to only fail if the autorest is not the same AND there is not an existing PR out for autorest generation.

@seankane-msft seankane-msft added the EngSys This issue is impacting the engineering system. label Apr 28, 2021
@seankane-msft seankane-msft self-assigned this Apr 28, 2021
@seankane-msft
Copy link
Contributor Author

#18393



def check_diff(folder):
def check_for_open_pr(service_directory):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is great to know, I can close this PR entirely then

return False


def check_diff(folder, service_dir):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git diff is for users to be able to inspect which files are different in the pipeline on a failure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. :)

@seankane-msft seankane-msft deleted the github-script branch April 29, 2021 12:11
ghost pushed a commit that referenced this pull request May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants