studydash / cards

Houses all cards created for StudyDash Group 00! 😀
http://studydash.github.io
2 stars 2 forks source link

Auto-milestone newly opened 'daily accomplishment' cards (6/3) #88

Open r002 opened 3 years ago

r002 commented 3 years ago

Today's Tasks:

Motivation/Problem Statement 💭❓:

So far, I've needed to manually milestone all cards opened with label=daily accomplishment to be milestone=Daily Accomplishment. This is obviously annoying and needs to rectified with automation! GitHub webhooks: The remedy for all ails! 😁 (Reminder: The dashboard only reflects "Daily Accomplishment" milestoned cards in real-time.)

image

Today's Goal/Solution 🥅:

I added logic to my GCP Go server to automatically milestone any newly opened issues that are labeled "daily accomplishment". The milestone is set to "Daily Accomplishment". In the GitHub universe, issues may have multiple labels but may only have one milestone.

Result 🍓🍌🍉:

It works! I've deployed the Go server to GCP. My original plan was to simply change the default issue template to automatically have milestone=Daily Accomplishment upon opening the issue. But it turns out the issue template doesn't support milestone defaults! (Or project defaults either.) For that reason, I had to write this auto-milestoning logic on the Go server.

Anyway, now when you create an issue with the default issue template, if you keep the dashboard open in an adjacent window, you'll see your new card appear on the dashboard in real-time! 😄

Observations & Next Steps 🔭👣:

Today I learned that the GitHub REST API doesn't allow you to programmatically set Projects or assign issues to columns! 😮 No worries though. Moving forward, the Project Board will no longer be updated. (I am curious though why Projects can't be programmatically set via the REST API. I'll reach out to GitHub to inquire.)

References 🔗:

Link any useful resources you may have found throughout the day.

Extra/Fun🎈🎉🥳:

r002 commented 3 years ago

Questions & Feature Improvement Ideas for GitHub

Idea: This Recent Deliveries list can update in real-time as the webhook deliveries happen!


image

anitabe404 commented 3 years ago

I don't think I'm seeing all of the updates that you are making. Am I missing something?

r002 commented 3 years ago

Hi @anitabe404! 🙋‍♂️

Here's a quick video that shows the features that I've added to our Study Group dashboard recently. These changes are live today in the QA build-- you can even test it out with a new card that you create today! (As long as you don't use Firefox! 😅 But I'll be fixing that bug later tonight!) In particular-- in the video, note the regions of the GUI that I circle in red-- namely, a GH issue's Milestone field:

https://user-images.githubusercontent.com/45280066/120897970-d882a780-c5f6-11eb-998a-efd5c0a573be.mp4

For some reason, the current GH default issue template configurator doesn't allow people to set a default value for Milestone. So I had to write some custom code to make this happen. It's been a fun exercise! 😄 The entire point of this is to make our dashboard real-time. This way when people add cards or comments, if you have our dashboard open at the time, you can just immediately see the new changes reflected in our GUI!

Right now it's just basic fields like a card's title and tags. But eventually, I'm going to include comment count and also an overall feed of selected events (eg. Comment reactions) that spans all study group members. If you have any suggestions for what might be useful or what you'd like to see, lmk! I'll try to add your ideas to our project! 😀

r002 commented 3 years ago

Update: The rendering problem is now fixed in Firefox. Latest build pushed to QA.