GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - OS-Guild/gittp: Expose a http api for any git repo

BranchesTags
Open more actions menu

Latest commit

 

History

76 Commits
76 Commits

Folders and files

NameName
Last commit message
Last commit date
config
config
 
 
lib
lib
 
 
priv
priv
 
 
test
test
 
 
web
web
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mix.exs
mix.exs
 
 
mix.lock
mix.lock
 
 
start.sh
start.sh
 
 
tmp
tmp
 
 

Repository files navigation

gittp

Expose a http api for any git repo

Usage

GET /api/content/{path}/{to}/{file} - Read the content of a file
example:

    get('http://yourhost/api/content/readme.md')
    .then(response => console.log(response))

    // {
    //   "isDirectory": false,
    //   "checksum": "5F251AC5FBC3DD0C0593296E5F9281239B8B660B503DD9234EBD49648831287B",
    //   "content": "hello world!"
    // }

GET /api/content/{path}/{to}/{directory} - Read the content of a directory
example:

    get('http://yourhost/api/content/readme.md')
    .then(response => console.log(response))

    // {
    //   "isDirectory": true,
    //   "content": ["readme.md", "license"]
    // }

POST /api/content/{path}/{to}/{file} - Set the content of a file, commit it to git and push to upstream. before invoking this action, you must read the file content and provide it's checksum as part of the request. You also need to provide a commit message. example:

post('http://yourhost/api/content/readme.md', {
    "checksum": "5F251AC5FBC3DD0C0593296E5F9281239B8B660B503DD9234EBD49648831287B",
    "commit_message": "update readme",
    "content": "hello world 2!"
})

PUT /api/content/{path}/{to}/{file} - Creates a new file at the given path

put('http://yourhost/api/content/new_readme.md', {
    "commit_message": "update readme",
    "content": "hello world 3!"
})

About

Expose a http api for any git repo

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

16 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.