Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

add command delete_repos #113

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

Conversation

PeterDaveHello
Copy link

This command can help me delete the useless or wrong repos, even help me recycle the quota of private repo, hope it can help somebody else.

Never learned and written in ruby before, please correct me if there exist any problem.

@PeterDaveHello PeterDaveHello force-pushed the delete_repos branch 2 times, most recently from 4d32c08 to 5c402c9 Compare April 6, 2015 17:39
)

request_stubs.each do |request_stub|
expect(request_stub).to have_been_requested.twice
Copy link
Author

Choose a reason for hiding this comment

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

I think I got problem here, I copied and modified this file from lib/teachers_pet/actions/create_repos.rb.

If I set have_been_requested. to once, I'll get

 Failure/Error: expect(request_stub).to have_been_requested.once
   The request GET https://testteacher:[email protected]/orgs/testorg/teams?per_page=100 was expected to execute 2 times but it executed 1 time

But if I set it to twice, I'll get

 Failure/Error: expect(request_stub).to have_been_requested.once
   The request GET https://testteacher:[email protected]/orgs/testorg was expected to execute 1 time but it executed 2 times

It's making me crazy 😢

Copy link
Author

Choose a reason for hiding this comment

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

Changed to at_least_once and it works 😈

@PeterDaveHello
Copy link
Author

I'm not sure the test is correct or not, just try to make it pass the CI build, hope somebody can help me audit it, many thanks.

@PeterDaveHello
Copy link
Author

Oops, I found #105 here, I swear that I didn't copy or refer to that PR ... or it won't spent me 2 hours ... 😭

@PeterDaveHello
Copy link
Author

Anybody here? @afeld Would you please help me audit this PR? Thank you!

@johndbritton
Copy link
Contributor

@PeterDaveHello I removed your comment in the other thread, but I will take a look at this.

@PeterDaveHello
Copy link
Author

Thanks @johndbritton 😄

@johndbritton
Copy link
Contributor

Thanks for the submission @PeterDaveHello, I took a look and it seems pretty straightforward. @mkcode can you take a closer look and provide some feedback if needed?

@PeterDaveHello
Copy link
Author

Thanks @johndbritton

@mkcode
Copy link

mkcode commented Oct 8, 2015

@PeterDaveHello - I added to this PR in #126. Can you please take a look at #126 and create a new PR targeting the delete-repos-cleanup branch? Thanks!

@PeterDaveHello
Copy link
Author

@mkcode ok I will.

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

Successfully merging this pull request may close these issues.

3 participants