Comments (2)
I'll start with the proxied repo flow. Here's some pseudo-code* to help identify needed API calls:
main flow
user goes to https://anonydog.org/fork and says they want to fork github repo
`upstream/forked-repo`
anonydog creates a fork of `upstream/forked-repo` at `anonydog/upstream-forked-repo`
using API call A and registers a webhook for receiving notifications using API call B
some time goes by as user works
user opens a pull request to `anonydog/upstream-forked-repo`
anonydog gets notified via webhook
anonydog creates (locally) a branch in `anonydog/upstream-forked-repo` with a name
`8f43110a` (randomly generated), pointing to the tip commit of the proposed pull request
as identified by attribute C
anonydog amends (locally) all commits between the base commit (as identified by attribute
D) and the tip replacing the author field with its name
anonydog publishes (git push) the `8f43110a` branch to github
anonydog opens a pull request from `8f43110a` to the proposed base branch (as identified
by attribute E) using API call F and the pull request description used by the user (as
identified by attribute G)
API call A
Fork upstream repo:
curl -X POST \
-H "Authorization: token `cat $HOME/tmp/my_super_secret_token`" \
https://api.github.com/repos/thiagoarrais/ignore-this/forks
docs: https://developer.github.com/v3/repos/forks/#create-a-fork
Rename forked repo (to achieve promised name):
curl -X PATCH \
-H "Authorization: token `cat $HOME/tmp/my_super_secret_token`" \
-d '{"name" : "upstream-forked-repo"}' \
https://api.github.com/repos/arraisbot/ignore-this
docs: https://developer.github.com/v3/repos/#edit
Potential problem with this approach: upstream mantainer receives a fork notification, (which makes deanonymisation a lot easier?)
API call B
curl -X POST \
-H "Authorization: token `cat $HOME/tmp/my_super_secret_token`" \
-d '{"name" : "web", "config": {"url" : "https://anonydog.org/_github/prs", "content_type": "json"}, "events": ["pull_request"]}' \
https://api.github.com/repos/arraisbot/upstream-forked-repo/hooks
docs: https://developer.github.com/v3/repos/hooks/#create-a-hook
attribute C
event["pull_request"]["head"]["sha"]
docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent
attribute D
event["pull_request"]["base"]["sha"]
docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent
attribute E
event["pull_request"]["base"]["ref"]
docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent
API call F
curl -X POST \
-H "Authorization: token `cat $HOME/tmp/my_super_secret_token`" \
-d '{"title": "did some stuff!", "body": "and opened this PR via API", "head": "arraisbot:contributor-pr", "base": "master"}' \
https://api.github.com/repos/thiagoarrais/ignore-this/pulls
result: thiagoarrais/github-sandbox#14
docs: https://developer.github.com/v3/pulls/#create-a-pull-request
attribute G
event["pull_request"]["title"]
event["pull_request"]["body"]
docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent
*: I don't know if I get to call this thing pseudo-code, but whatever...
from anonydog.
OK. I'll settle for a simpler version of the functionality as a first version. There will be no magical coin: the bot will anonymize any pull requests it receives. It neither will relay comments between the original and the fake PRs.
Here's what I'm considering before going live with the alpha/beta:
- better "i did anonymize your pull request" message
- presentable homepage with a big green "i'm ready. let's get started" button
from anonydog.
Related Issues (20)
- browser extension HOT 2
- browser extension: cannot use remote images
- browser extension: missing icon
- browser extension: missing privacy policy
- Contributor cannot reference issue number
- Comment from maintainer did not get relayed
- Cannot link to contributor comment (?)
- Rebase did not get synchronized
- Publish extension for Chrome HOT 2
- comments don't get echoed HOT 5
- Notify author when PR gets merged
- Por favor faรงa um logo para a gente HOT 3
- commits don't get added HOT 3
- Replace backers badge with barkers badge HOT 1
- https for webapp and webhook
- multi-server support
- need to change user data (cloud-config.txt) manually HOT 2
- need to start apps manually
- echo reviews HOT 1
- mirror reviews
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 anonydog.