Skip to main content

A web server receive HTTP request to pull local repository

Project description

A web server receive HTTP request to pull local repository

install

GitAgent based on python3, and those libs was required.

  • Tornado

  • GitPython

you can use pip3 to install it.

Usage

python3 agent.py

API

list all repos

curl -v 'http://localhost:10000/repo'

Return:

[
    "demo1",
    "demo2",
    "demo3"
]

repo status

curl -v 'http://localhost:10000/repo/demo1'

Return:

{
    {
    "author": "AlexaZhou",
    "busy": false,
    "changed_files": {
        "A": [],
        "D": [],
        "M": [
            "agent.py"
        ],
        "R": []
    },
    "dirty": true,
    "hash": "c8c082d898c2dc18adb8e79f8992c074fb2294ce",
    "message": "some message text",
    "untracked_files": [
        "config.json"
    ]
}

busy means the repo is processing a pull request or other action

repo pull / switch branch / switch hash

curl -v -d 'git_branch=master&git_hash=abcdefg&block=1' 'http://localhost:10000/repo/demo1/pull'

Return:

{
    "ret": "success"
}

if block = 1, the request will block until the git work finish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GitAgent-0.0.7.tar.gz (7.0 kB view details)

Uploaded Source

File details

Details for the file GitAgent-0.0.7.tar.gz.

File metadata

  • Download URL: GitAgent-0.0.7.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for GitAgent-0.0.7.tar.gz
Algorithm Hash digest
SHA256 9dde2e5f90d278e1aef18eea1b2fd1b9c5ef01bf13cc141b8506130974901b33
MD5 0dfe7c3b84cceea802d820b718655203
BLAKE2b-256 582fb7fe69caa5c534be4c28807a79e0fc1f4c33236e5b1ed25ed87cbc1b9257

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page