Comments (5)
Version 0.2.0 now:
-
Fetches forked repos based on
pushed_at || updated_at || created_at
date. -
Lists the forked repositories that will and won't be deleted:
fork-sweeper --owner rednafi --token $GITHUB_TOKEN --older-than-days 0
This returns:
Fetching forked repositories for rednafi... Guarded forked repos [won't be deleted]: Unguarded forked repos [will be deleted]: - https://github.com/rednafi/cpython - https://github.com/rednafi/dysconfig - https://github.com/rednafi/pydantic
-
Explicitly filter out forked repositories with fuzzy name matching:
fork-sweeper --owner "rednafi" --token $GITHUB_TOKEN --older-than-days 0 --guard 'py'
This prints:
Fetching forked repositories for rednafi... Guarded forked repos [won't be deleted]: - https://github.com/rednafi/cpython - https://github.com/rednafi/pydantic Unguarded forked repos [will be deleted]: - https://github.com/rednafi/dysconfig
from fork-sweeper.
Nice ! π
I think however the biggest value would come from an "open PR" guard. It may require some more work though as I don't know if this information can easily be obtained with GitHub's API.
Also, listing why repos are protected would be a good addition too IMO.
from fork-sweeper.
Thank you for the ideas; they are great!
I really like the idea of deleting repositories based on the last activity date, rather than the creation date. This can be done without changing the external flag.
Also, a --protect
flag that will take a list of repositories sounds useful.
I'll start tackling tasks from the lowest level of complexity to the highest. Also, feel free to open a PR if you have strong opinions about the implementation.
from fork-sweeper.
Yeah, a PR guard would be nice I agree. But at the same time, it's hard to track that without consuming some event.
Listing why a repo was filtered out seems like an easy low-hanging fruit.
from fork-sweeper.
After doing some exploration, it looks like the open PR feature can be implemented quite easily with the GraphQL API but would require several calls with the REST API.
Thereβs a discussion on the refined-github repo about this, specifically this comment: refined-github/refined-github#2268 (comment)
from fork-sweeper.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fork-sweeper.