Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(create_prs): sleep at the end #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leszekbulawa
Copy link

@leszekbulawa leszekbulawa commented Nov 18, 2024

Reasoning

Currently, when creating PRs with sleep, the procedure starts with the sleep.
This is not optimal, eg. it's possible that after waiting for a certain amount of time the user will be presented with an error.

➜  turbolift create-prs --sleep 30s
  OK   Reading campaign data (repos.txt, README.md)
  OK   Sleeping for 30s
 FAIL  Pushing changes in leszekbulawa/myrepo to origin: exit status 128

Description of change

Moved sleep to the end of create_prs function.

Before (starts with the sleep):

turbolift create-prs --sleep 30s 
  OK   Reading campaign data (repos.txt, README.md)
  OK   Sleeping for 30s
 WARN  Pushing changes in me/non-existing-repo to origin: Directory work/me/non-existing-repo does not exist - has it been cloned?

  OK   turbolift create-prs completed (0 OK, 1 skipped)

After:

 ~/dev/turbolift/turbolift create-prs --sleep 30s
  OK   Reading campaign data (repos.txt, README.md)
 WARN  Pushing changes in me/non-existing-repo to origin: Directory work/me/non-existing-repo does not exist - has it been cloned?

  OK   turbolift create-prs completed (0 OK, 1 skipped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant