CodeYourFuture / Changes

How can I make change at CYF??
https://cyf-change-board.netlify.app/
Creative Commons Attribution 4.0 International
3 stars 4 forks source link

Github app to batch clone Github Issues #2

Closed SallyMcGrath closed 10 months ago

SallyMcGrath commented 1 year ago

I want to do this:

  1. Build a Github App that batch clones GitHub Issues from a CYF coursework repo to a trainee's coursework repo.

  2. Build a React component that queries the coursework repo and shows the issues as assignments.

Here’s why I want to do it:

  1. I want to free us all from the burden of Google Classroom, which drives us all mad
  2. I want a single source of truth for coursework assignments so that there's only one place to make changes instead of ~12
  3. I want to use something our volunteers are familiar with already
  4. I want to use something more than 20 people can access
  5. I want to use something with a free, functional API we can get useful data from easily
  6. I want to use something that empowers our trainees to plan their time
  7. I want to use something that prepares our trainees for Final Projects
  8. I want to use something that our trainees will need to know and use again in their careers
  9. I want to use something that will generate insights from activity data automatically
  10. I want to use something public, that isn't hidden away

Here’s how it serves our goals:

See above. The Github app serves all the listed goals. It is a small, practical bridge between three existing platforms: the syllabus, gihub, and the trainee tracker.

This is how much time I can put towards this change:

already done:

still available

This is the help I need from others to get this done (if any):

  1. I need a contractor to build the Github App and button
  2. I need some juniors to :
    • build the React component for the Syllabus
    • export all the coursework from boilerplate classroom to a google sheet
    • programmatically create issues from a spreadsheet (there are multiple premade scripts to do this as it's a common use case)
    • test the kanbans and iterate on them

SPEC DOC

SallyMcGrath commented 1 year ago

@berkeli @kfklein15

berkeli commented 1 year ago

Hi @SallyMcGrath, thanks for the detailed document. I will start prototyping today on the github app and let you know how it goes.

berkeli commented 1 year ago

So some findings:

  1. Labels/Milestones need to be created manually, they cannot be applied if they do not exist in trainee's account. Solution: Create labels/milestones from the app based on template
  2. Labels/Milestons can only be pulled from the API if they are assigned to an issue. This means we cannot pull all labels/milestones at once and create them. Solution A: have a hard-coded list of Labels/Milestones, this will make things easier but it's extra toil for CYF when there's an update. Solution B: Create labels/milestones as we go, this is extra piece of code and requests to API but a better solution and will not require manual work. This is what I'm working on at the moment.
  3. Milestones are based on id (e.g. 1,2,3,4...). This complicates things slightly, because if trainees create their own milestones, IDs will no longer match the template. Solution: Match milestones by name, this requires extra calls to API and logic to handle matching but shouldn't be an issue
  4. The app will not have state, this means we cannot remember if the user is logged in. Solution: Syllabus will have a stateful button (using localstorage) and will manage authorization of the user. The app will have an endpoint for authorization that will issue a token, which is then stored in state. Users can then click on "clone" button which make request to the app with the token provided.

@SallyMcGrath Let me know if you have any thoughts, I will have a POC to demo in the coming week.

SallyMcGrath commented 1 year ago

This all looks good and makes sense. Couple things

  1. yes: reduce toil -- remove all repetitive manual tasks like copying tickets, setting up labels
  2. but also yes: reduce "magic" -- retain the power for each trainee to adapt, control, and even break their own planning board
SallyMcGrath commented 1 year ago

Updating on this:

We have created:

We will try it for L10/GL6

berkeli commented 1 year ago

An update from me:

Syllabus:

APP:

SallyMcGrath commented 1 year ago

Awesome -- please bear in mind that the syllabus front end will probably be replaced in the next few months, so don't tie your button app too closely to the docusaurus front end.

If you have requirements for the front end (eg, React), also state them

40thieves commented 1 year ago

Quick update on this: I reviewed the original PR for the frontend piece, which is looking good. However as Sally mentions above, we are now looking to replace the current version of the Syllabus and move away from Docusaurus / built-in MDX.

This means that the PR will need to be made a bit more generic to work with the new syllabus. We do want to support React components in the new syllabus, so we were thinking that extracting out the underlying components to a separate library would be a viable option. We could then install that into the new syllabus codebase. I’d be happy to help with this and/or review anything!

I'm also attempting to review the code in https://github.com/berkeli/coursework-helper, but to be honest I'm not much of a backend dev and don't have much experience with Nest. But it's an interesting learning experience :)