Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Automate PR reviews #4236

Closed
alisonjoseph opened this issue Apr 23, 2020 · 6 comments
Closed

Automate PR reviews #4236

alisonjoseph opened this issue Apr 23, 2020 · 6 comments
Labels
status: inactive Will close if there's no further activity within a given time

Comments

@alisonjoseph
Copy link
Member

Need a way to add testing of some sort and automate the PR review process for the tutorial.

@mattrosno
Copy link
Member

Proposal is here: carbon-design-system/carbon-website#986

Matt Rosno 10:54
there's two parts to automating this. 1) PR CI passing tests -> through a GH action or something we add a label saying the step was successfully completed and we comment and close. 2) the whole survey gizmo part and acclaim part.
10:54
the first part, the part that you do, will be the biggest time saver.

Alison Joseph 10:54 AM
so many PRs

Matt Rosno 10:54 AM
because if looking for a label, it's easy to search GH by author and that label to verify they deserve the badge.

Alison Joseph 10:55 AM
and yep for sure, does EDT fully automate their badging?

Matt Rosno 10:55 AM
ya, and for the second part, we can eventually get there. i already have acclaim API access for carbon insights.
10:59
and actually, we could use a serverless function for the second part. a form we host that has inputs for GH username, which tutorial, and their email address. in the lambda function we hit GH API to look for their PRs with the completion labels. if all good, pass that email to acclaim API or return an error with what steps are missing and to apply again once all steps are done.
11:00
acclaim returns error if recipient already has badge, so all good there. technically, person A could apply for badge on person B's behalf, but all good because once issued a badge, the recipient has to accept it so if not accepted, no harm no fowl.
11:00
all in all, no database needed to track tutorial completion which is great

@mattrosno
Copy link
Member

Phase 1, PR review

  1. Duplicate carbon-tutorial repo so there's a sandbox repo for development
  2. Add CI to the repo so every PR runs tests
  3. Write tests that fail at the start of each tutorial step, so completion of the step results in passing tests
  4. Write a GH action that fires on a new PR, if CI passes, add a label, comment, and close the PR
  5. Update tutorial instructions to reflect new process

Phase 2, badge application

  1. New form that asks for person's email address, GH username, submits to a serverless function that 1) hits GH API and looks for completion of all tutorial steps and if all looks good, 2) issues the badge through Acclaim's API

@mattrosno
Copy link
Member

Phase 2 - in that form that we put in the wrapping up page, as we gather the person's email and GH username, maybe we can make sure that email is associated with that GH account through GH API?

@tw15egan
Copy link
Member

Proof of Concept for Phase 1 can be seen here: tw15egan/tutorial-tester#13

@stale
Copy link

stale bot commented Jun 20, 2020

We've marked this as stale because there hasn't been any activity for 30 days. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Jun 20, 2020
@stale
Copy link

stale bot commented Jun 23, 2020

As there's been no activity since this issue was marked as stale, we are auto-closing it.

@stale stale bot closed this as completed Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: inactive Will close if there's no further activity within a given time
Projects
None yet
Development

No branches or pull requests

3 participants