Maintains a clone of a git repository that can be queried for ancestry relationships
Mirrors a Git repo to which web applications can make efficient queries for information that the GitHub API does not provide.
Serves pytorch repo
Keeps repo clone up-to-date by re-fetch
ing upon GitHub push
and pull_request
events.
fetch
or clone
operationsIntended for hosting on Elastic Beanstalk.
Use this command to set the GitHub webhook secret:
eb setenv GITHUB_WEBHOOK_SECRET=your_secret
To deploy the application, run:
./deploy.sh
Set up a GitHub webhook to post to http://gadgit.pytorch.org/github-webhook-event
upon pushes.
This will trigger a re-fetch of the relevant refs.
Run:
eb-flask/application.py
Exercise an endpoint with curl
:
curl --data '["0c7537c40939f7682c179813a4b7a50020f08152", "7ed9a3ec4895f0f501cf435fec88ff974d93f3da"]' http://localhost:5000/commit-metadata
Sometimes the repo becomes corrupted, with commands returning error messages like:
fatal: Not a git repository: '/tmp/repo/pytorch.git'
This can be a symptom of a missing HEAD
file.
To fix this, create the file /tmp/repo/pytorch.git/HEAD
with the content:
ref: refs/heads/master