A simple web-app allowing you to batch archive groups of repositories from a given organization

Related tags

Utilities ice-repos
Overview

ice-repos

My goal here is to build a simple web-app allowing you to batch archive groups of repositories from a given organization, using Rust+Yew.

As a university faculty in computer science, I end up being the (co-)owner of dozens (often over 100) student repositories a year that are created via GitHub Classroom. I would like to archive these at the end of each semester or school year for a variety of reasons:

  • It would help make it clear to folks that stumble across them that they're not under active development.
  • I wouldn't keep getting notifications (often many notifications) from tools like Dependabot because repositories from old courses have a dependency with a potential security concern.

Archiving a single repository via the GitHub web interface is reasonable enough, but archiving dozens of repositories by hand is incredibly tedious and really not feasible. It's pretty clear that this is doable via the GitHub API, though, so I'd like to build a simple web app that allows me (and any other folks that might find this helpful) to specify an organization (e.g., the organization for a given semester of a course), and then get a list of the (not yet archived) repos in that organization, with the option of selecting which ones we'd like to actually archive.

My current plan is to do this as a Rust+Yew WASM app. There's really no particular reason to use Rust for this, but gaining a better understanding of Rust is one of my Year of Programming goals, so why not use it here?

I'll start by just trying to get a basic system up and running, but there are some things I might be interested in experimenting with as we go along:

  • Use Cypress for E2E testing on the app. Probably don't really need it here, because the interface and functionality will be pretty simple, but it might be interesting to see how that plays out here. A downside, though, is that will bring the whole JS/npm ecosystem into the project, which is a pain. I don't know anything comparable that doesn't, though. I'll start with just Rust unit testing, but if I feel a compelling urge to bring in E2E testing then we'll rent a big tractor and drag Cypress into the picture. I did a little experiment to convince myself that it's doable, and it totally is, so we'll see.
  • See if I can get some kind of code coverage report, preferably tht can be included in the build checks via GitHub Actions.
  • Deploy the app on GitHub pages. I don't think there's any reason that this can't work fine as a serverless app, and if that does work then I can make this available to other interested folks (e.g., other instructors, people retiring old organizations) without any deployment cost to me. There seems to be a template that may help set up a lot of what we want, so it might be worth trying that.
  • Work on the CSS to make it look at least decent. I've never actually done much CSS work, and this would be a good opportunity to gain some useful experience there. It looks like a lot of the cool kids are using TailwindsCSS, and there's a starter template that includes Tailwinds with Rust and Yew, so I might go with that.
  • Using GraphQL for the queries. I've never actually done anything with GraphQL, but my understanding is that GitHub has nice GraphQL support, so this might be a good opportunity to explore that space. I can imagine situations where we might get info on a lot of repos (maybe more than 100) in an organization, and only need a fairly small subset of the details for each repository, which I think is exactly the kind of thing that GraphQL is good at. (I don't really know what I'm talking about, though. 😜 ) There are definitely GraphQL libraries and examples for Rust, but I haven't really looked at any of them.
  • It might be interesting to build the same thing in a more "traditional" JS/TS framework as well, and it could be a nice excuse to try out something like Svelte or similar that I haven't used before. I'm not sure that will happen, but you never know.
  • Go through the full GitHub "stuff you should do with your repo" list, like have development guidelines and the like. I've seen things like that show up in the settings over the past several years, but I've never stepped back to take a look at what all is happening there or think about how that might apply in, e.g., our course repositories.
Comments
  • Work on pagination

    Work on pagination

    This adds pagination support to the project. We parse the total number of pages from the link field in the response headers, and from that we can populate a DaisyUI component to display the page options. We also have to save the current page in the RepositoryListState and request the correct page when the user clicks on one of the pagination buttons.

    This doesn't yet work, but it's a solid start on adding pagination of repositories.

    We've had to expand the state of the RepositoryList component to include the current and last page numbers.

    The last page number should be parseable from the link field in the response header, but that's not yet fully working. I tried using regex and got close but not quite there. @esitsu from Twitch suggested an alternative approach that parses the URLs using the url crate, and I might switch to that.

    We restored the display of previously archived repositories because without them the pagination will be all confused. When we get this working, we probably do something to shuffle the archived repos to the end of the list.

    opened by NicMcPhee 0
  • Turn on recommended Clippy warnings

    Turn on recommended Clippy warnings

    This turns on the recommendations from the No Boilerplate video "Build your Rust lightsaber".

    I couldn't figure out how to replace the if-let with Option::map_or_else as Clippy recommends, so that warning is still "live", but I fixed everything else except for the two unwrap warnings that definitely need to be resolved in the error handling improvements.

    opened by NicMcPhee 0
  • Add basic http request for repositories for an organization

    Add basic http request for repositories for an organization

    This gets the basic HTTP request working. The user can enter an organization, and this will get the list of repositories for that organization from GitHub via their REST API and display it.

    There are still issues (the UI is ugly, there's no meaningful error handling), but it's a start. We'll need to sort out authentication before we can do much more with the GitHub side of things.

    opened by NicMcPhee 0
  • Sketch app home page

    Sketch app home page

    This adds the initial text field component, which we'll now need to pass on to a (currently nonexistent) component that will make the call to the GitHub API to get the list of repos associated with the entered organization.

    opened by NicMcPhee 0
  • Get the basic template running

    Get the basic template running

    This copied the template from https://github.com/Ja-sonYun/yew-template-for-github-io and did a little fiddling to get everything to run.

    For reasons I don't fully understand, I had to run cargo install wasm-bindgen-cli to get things to build on my laptop, but that did seem to fix things there. I did not seem to need to do this on the desktop during the livestream. Not sure what was happening there.

    The deployment to GitHub pages doesn't seem to work at the moment, and I'll need to look into that.

    opened by NicMcPhee 0
  • Add ability to also archive dependent repositories

    Add ability to also archive dependent repositories

    tougeki13@Twitch provided the nice suggestion that it could be useful to also archive repositories that depend on the repository being archived.

    That doesn't immediately affect me, because there are no cross repository dependencies in our class projects, but I could see it being useful for other people so we might come back to this if there's interest or demand.

    opened by NicMcPhee 0
  • Display how long since last modification instead of date of last modification

    Display how long since last modification instead of date of last modification

    What we get from GitHub is the date of last update/push (e.g., "2020-01-23"), but what might be more useful to display is how long since the last update/push (e.g., "2+ years"). These could even be color coded, with things over a year old being green (or something) to indicate that archiving them makes a lot of sense, and things updated in the last few months being red (or whatever) to indicate that they are being actively used and should be left alone.

    opened by NicMcPhee 0
  • Get GitHub Pages deployment working

    Get GitHub Pages deployment working

    At least initially the GitHub Pages deployment seems broken and I'm not sure why. That's an important goal for the project, though, so I need to fix it.

    opened by NicMcPhee 1
Owner
Nic McPhee
Nic McPhee
A simple *blazingly fast* Rust library to unzip an S3 archive without downloading.

S3-unzip A simple blazingly fast Rust library to unzip an S3 archive into S3's root directory. Works without downloading the archive or putting it int

Mykhailo Bondarenko 9 Jul 12, 2022
Batch rename utility for developers

nomino Batch rename utility for developers How to install Pre-Compiled You can download a pre-compiled executable for Linux, MacOS and Windows operati

Navid 458 Dec 27, 2022
Sol Batch Token Transfer CSV

Sol Batch Token Transfer CSV This script can batch transfer any SPL token to multiple addresses listed in a CSV, and then save the tx hash to a new CS

The Z Institute 10 Nov 6, 2022
Rust crate which provides direct access to files within a Debian archive

debarchive This Rust crate provides direct access to files within a Debian archive. This crate is used by our debrep utility to generate the Packages

Pop!_OS 11 Dec 18, 2021
A small tool to clone git repositories to a standard location, organised by domain name and path.

A small tool to clone git repositories to a standard location, organised by domain name and path. Runs on BSD, Linux, macOS, Windows, and more.

Wesley Moore 68 Dec 19, 2022
Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code

Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically!

null 255 Dec 30, 2022
Massayo is a small proof-of-concept Rust library which removes AV/EDR hooks in a given system DLL

Massayo Massayo is a small proof-of-concept Rust library based on UnhookingPOC, which removes AV/EDR hooks in a given system DLL. I tried to reduce fi

null 53 Dec 21, 2022
A special web app to render fancy UTF-8 sequences. :hindu_temple: :scroll:

UTF RENDER ?? ?? A special web app to render fancy UTF-8 sequences. ?? ?? ABOUT ?? Emojis and fancy symbols are part of the UTF-8 character standard (

✭ ANGEL DOLLFACE ✭ 4 Jan 15, 2023
Web-wrapped Supabase desktop app for macOS, Windows & Linux powered by Tauri

Supabase Desktop App What is it? It's a cross-platform web-wrapped Supabase desktop app powered by Tauri. You can install it on your macOS, Windows (u

Abiel Zulio M 12 Jan 25, 2023
Fusion is a cross-platform App Dev ToolKit build on Rust . Fusion lets you create Beautiful and Fast apps for mobile and desktop platform.

Fusion is a cross-platform App Dev ToolKit build on Rust . Fusion lets you create Beautiful and Fast apps for mobile and desktop platform.

Fusion 1 Oct 19, 2021
Desktop app for UpVPN - Pay as you go VPN

upvpn A Modern Serverless VPN upvpn upvpn (pronounced Up VPN) lets you connect to the internet from a location of your choice. For more information pl

UpVPN 11 Jul 1, 2023
Searchbuddy is a browser extension that lets you chat with people that are searching for what you're searching for.

searchbuddy Make friends while searching! Searchbuddy is a browser extension that lets you chat with people that are searching for what you're searchi

Joseph Gerber 14 May 23, 2022
Flexcord! A custom Discord client to allow you to do what you want!

Disclaimer Flexcord is NO WHERE near done. Flexcord What is it? Flexcord is a Discord client that flexes for your needs, it allows you to do exactly w

null 2 Dec 5, 2022
Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. After all it's just a cat.

Bongo Copy Cat Introduction Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. Afte

Abhijeet Singh 4 Jan 23, 2023
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

Rafał Mikrut 9.2k Jan 4, 2023
Simple comparison app for iRacing car setups.

CarTunes Simple comparison app for iRacing car setups. About Export a setup in the iRacing garage and CarTunes will let you compare it with other setu

Jay Oster 31 Jan 7, 2023
A stupidly simple and easy to self-host, personal server for file hosting on the web

Grasswave CDN A stupidly simple and easy to self-host, personal server for file hosting on the web. Written in Rust. Thanks, @Maciejowski, for the sty

Rafał Baran 3 Jan 3, 2023
How to use libtor in a Rust app

libtor example Uses libtor crate to run a Tor daemon in process. This example spawns the Tor daemon using Tokio's spawn_blocking, and then spawns othe

Byron Hambly 1 Nov 28, 2021
A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtuber models.

facelink_rs A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtube

Slashscreen 2 May 6, 2022