Comments (25)
Lets create it!
from personal-sites.
Any update on this?
from personal-sites.
Yeah - I'm in DC for the week so I'll finish it up next week.
from personal-sites.
++
from personal-sites.
Also check for duplicates and make all the GitHub URLs normalised to use https://
.
from personal-sites.
I support this
from personal-sites.
Also check if someone does a pull request, suggest that their GitHub profile should be in the GitHub list too. That would save me some time since I often go through and add all the PR profiles myself.
from personal-sites.
Flow seems to be:
webhook for pull request => get commit hash from webhook => push pending status to github => run checks on the commit's diff => push good/bad status to github
Gonna have to work out how to parse the diff.
Uses: https://developer.github.com/v3/repos/statuses/
from personal-sites.
https://github.com/iangcarroll/pr-bot/pull/9 shows a demonstration of statuses. Webhook is partially working now.
from personal-sites.
Do you need to parse the diff? I would apply the patch using git-apply
or patch
and then see if the file checker fails on the changed file.
from personal-sites.
Now that I think about it, you could write something really quickly that just runs on Travis-CI.
from personal-sites.
That's a good idea, but we don't have a file checker (yet).
from personal-sites.
Given the webhook logic is mostly done, moving it to Travis would be more work. Applying the .patch
version would be interesting, though.
from personal-sites.
URL extraction and testing via preg_match_all
is done, although cURL currently throws an exception if the domain doesn't exist that we're not catching (and thus the PR gets stuck on pending).
What's left:
- VT result check
- ABC order
from personal-sites.
VT results done: https://github.com/iangcarroll/pr-bot/pull/21
from personal-sites.
Until I wrap this up, I put the source up at https://github.com/iangcarroll/pr-bot-src, if anyone wants to submit a PR for ABC ordering.
from personal-sites.
PHP?
On 07/10/2015 12:29 PM, Ian Carroll wrote:
Until I wrap this up, I put the source up at
https://github.com/iangcarroll/pr-bot-src, if anyone wants to submit a
PR for ABC ordering.—
Reply to this email directly or view it on GitHub
#207 (comment).
from personal-sites.
It's a Laravel 5.0 app, yes.
from personal-sites.
:( Node.js is the only real dev language -- everything else...is just lame :P Esp. php.
On 07/10/2015 01:39 PM, Ian Carroll wrote:
It's a Laravel 5.0 app, yes.
—
Reply to this email directly or view it on GitHub
#207 (comment).
from personal-sites.
Do we really need something as heavy as a MVC app? We can just have a worker in the background.
from personal-sites.
Written in Node.js.
from personal-sites.
Heavy, maybe, but its maintainability, speed or functionality are not impeded by it. All the logic is in app/Http/Controllers/PullRequestController.php
, for those inclined to contribute.
I'm running into a problem parsing the .diff
. What I think I'm going to do is perform alphabetical sorting on the sections in it, and not the entire file. This will validate sorting on the three names above and below each addition, which I believe is acceptable. The reason for this is that the .diff is not a complete version of the file, and only stores additions, deletions, and the 3 lines above and below any aforementioned changes. This also dodges the problem of changes to both the personal site and GitHub section.
The only other way would be fetching the resulting Markdown from the commit and parsing that, which seems a bit much (given we'd still have to parse the .diff
to extract the URL additions so we don't re-check every URL every PR).
I'll have to re-do part of the validation logic, but I should have something shortly.
from personal-sites.
What will it take to bring this to fruition?
from personal-sites.
I'm way too busy (as usual, unfortunately) but I'll lay out the approach I took for future takers per @hellyeah's request:
- Receive a GitHub webhook, verify its signature and discard anything that isn't a newly opened pull request
- Pull the commit hash from the webhook and fetch it via the GitHub API
- Download the
.diff
from the previous response - (flawed approach that I took) Regex the .diff for URLs and run checks on them
(correct approach) Parse each line, assuming the last "word" is the URL and everything else is the name, and check the alphabetical order on the names
Of course, both approaches suffer from the 3-line limitation on how diffs are created. @zmughal had suggested applying the .diff to a local file which could work, but was not especially easy with PHP.
I'll remove myself as the assigned person.
from personal-sites.
I setup a Buildkite job using the script from #345, but I'm waiting on an admin to add the webhook. PR statuses should start showing once that's in place.
from personal-sites.
Related Issues (18)
- Would it be helpful to crossthrough/delete entries where the website no longer exists? HOT 4
- Separate markdown files for different profiles HOT 7
- Automatically check for alphabetical order HOT 1
- Post link monthly to HH?
- Automatically add new HH members personal websites and githubs
- Track # of HH members who have a personal website/github as a metric of success
- Website submission?
- HH LinkedIns and Portfolios
- Broken Entry HOT 1
- Dead/Spammy Links HOT 11
- How about also adding a link to GitHub profiles here? HOT 2
- Closing pending Pull requests HOT 3
- Link Not Found
- Is this still active? HOT 1
- Inappropriate Content - http://jessmchang.com/ HOT 1
- Stolen
- Need help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from personal-sites.