Here are the updates made since the original progress post:
added support for bot commands, starting with the [meep close] command
the site now fetches labels created dynamically for new meep requests
the site is now responsive on mobile/tablet
meeps are only filed at most once (in the event the same commit is pushed to multiple branches)
Thanks to everyone who took it for a spin and/or submitted feedback!
My Workflow
Getting started with a new programming language or framework? Trying to learn a new paradigm like functional programming? Perhaps you're getting started with a new discipline, like compiler engineering or graphics programming? Normally, we'd learn by authoring code in a "sandbox" and see what works while following along a book or tutorial. But what if you would like some pointers or feedback from someone more experienced? Stackoverflow could work, but the site encourages questions with a high degree of specificity. You can't just ask for holistic feedback for code.
More Eyes, Plz! is a service powered by Github actions to easily crowdsource commits made to any repository. To get started simply install the meep scanner action to the repo you'd like to get feedback on, or copy the following snippet to .github/workflows/meep.yml:
Integrate this action into your repository to start crowdsourcing feedback for your commits!
MEEP Scanner
The MEEP Scanner is a lightweight action that integrates with the More Eyes, Plz! service. When installed in a repository, the scanner scans commit messages for the [MEEP] or [meep] string. When present, the commit becomes indexed in the MEEP database for others in the community to discover.
Note that this action only works on repositories that are public at this time. Without public visibility, outside members of the community will not be able to view your commits to provide feedback.
Usage
For each repository you wish to potentially request feedback on, please performing the following steps:
1. Add topics to your repository
Topics added help others discover your requests more easily through filters. To do this, hit the settings wheel at the top right of your repository's home page. Then, add topics that pertain to your code. This could be the programming language, a framework or library…
This is a weekend project built by Jeremy and Hannah Ong as a submission to the Dev.to's GitHub Actions Hackathon. We thought that in the spirit of Dev.to and GitHub's community, that a community-led resource to help people like myself get feedback on GitHub commits would be a great submission. It went on to win the grand prize in the "Maintainer Must-Haves" category.
This README in particular will be the main documentation that explains how all the repos within More Eyes, Plz are connected.
Even the deployment of the site (created via create-react-app) is automated using a workflow which may be useful to others. The code used is pasted below:
Feel free to adapt this for your needs! The only thing you would probably want to change is the identifying user.email and user.name local git config (it needs to push to the site branch).
Additional Resources / Info
This project was done in collaboration with @duchesstoffee (my wife). She did the frontend, responsible for querying the meeps database (hosted using the issue tracker of this meta repo), fetch labels, and enabling tag-based searching. The frontend is built as a single page application, using the fetch API and OAuth credentials to pull data from Github.
Here is a list of dependencies used for the frontend:
The backend is largely driven via actions and Github itself, with no database or dedicated servers. However, a few Google Cloud functions are used simply to proxy information in a secure manner in cases where we could not ship a developer secret (with write credentials to the meeps repo) to the client. A Google Cloud function is also used to handle the oauth redirect. Here's the code for the Oauth handling for example, which runs on vanilla nodejs with no dependencies:
Here's the code for the Google Cloud function which handles the Github Webhook and forwards it as a workflow dispatch event to themeepbot bot workflow:
consthttps=require('https');exports.webhook=(req,res)=>{// Validate github user-agentif (!req.headers['user-agent'].startsWith('GitHub-Hookshot')){returnres.sendStatus(404);}constevent=req.headers['x-github-event'];if (!event){console.error('Missing event from request payload');returnres.sendStatus(404);}constbody=JSON.stringify({ref:'master',inputs:{payload:Buffer.from(JSON.stringify(req.body)).toString('base64'),event,}});constrequest=https.request({host:'api.github.com',path:`/repos/moreeyesplz/themeepbot/actions/workflows/bot.yml/dispatches`,method:'POST',headers:{Accept:'application/vnd.github.v3+json',Authorization:`token ${process.env.GITHUB_TOKEN}`,'User-Agent':'moreeyesplz','Content-Type':'application/json','Content-Length':body.length,}},(response)=>{response.setEncoding('utf8');constchunks=[];response.on('data',(chunk)=>chunks.push(chunk));response.on('end',()=>{if (response.statusCode!==204){console.error(`Workflow not dispatched: ${chunks.join('')}`);}res.sendStatus(response.statusCode);})});request.write(body);request.end();}
The main "implementation detail" here is that workflow event payloads have far more keys and nested objects than what the workflow_dispatch can receive as inputs (limit is 10). As a workaround, this event proxy simply base64 encodes the entire payload and forwards it as a single event for the downstream action to parse later. Thus, the "heavy lifting" that needs to interact with the Github APIs can be done in action-based workflows.
All the actions and workflow code are very light on dependencies, using only the actions toolkit.