2017 © Pedro Peláez
 

library git-rest-api-client

A php client interfacing with the rest api from node-git-rest-api

image

shadiakiki1986/git-rest-api-client

A php client interfacing with the rest api from node-git-rest-api

  • Monday, January 16, 2017
  • by shadiakiki1986
  • Repository
  • 1 Watchers
  • 0 Stars
  • 325 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 18 Versions
  • 4 % Grown

The README.md

git-rest-api-client-php

Build Status, (*1)

PHP client interfacing with RESTful API from server running node-git-rest-api, as dockerized in docker-node-git-rest-api, (*2)

Install

Published on packagist, (*3)

composer require shadiakiki1986/git-rest-api-client

Use

Launch a node-git-rest-api server, (*4)

docker run -p 8081:8081 -it shadiakiki1986/docker-node-git-rest-api

To make changes to a file in a repository, (*5)

$git        = new GitRestApi\Client('http://localhost:8081');
// clone a git repository on github
$remote = 'https://USERNAME:PASSWORD@github.com/shadiakiki1986/git-data-repo-testDataRepo';
$repo = $git->cloneRemote($remote);
// update a file called 'filename' in the repository
$repo->put('filename','some content');
// commit the changes
$repo->commit('a new commit message');
// push to the remote
$repo->push();

To pull changes and get contents of a file, (*6)

$git        = new GitRestApi\Client();
// get already-cloned git repository
$repo = $git->get('git-data-repo-testDataRepo');
// pull changes
$repo->pull();
// get contents of file
$repo->get('filename');

Testing locally

' VERY IMPORTANT NOTE: Do NOT directly run node-git-rest-api on your local machine and test this package against it. The tests contain a few git config --global ... calls, which would change your username/email on your local machine, and hence screwing up your git commits in all other repositories. ', (*7)

Launch a node-git-rest-api server, (*8)

docker run -p 8081:8081 -it shadiakiki1986/docker-node-git-rest-api

composer test will test everything except a successful push., (*9)

export GitRestApiTestUrl=https://shadiakiki1986:veggiepizza@github.com/shadiakiki1986/git-data-repo-testDataRepo
composer test

will test everything, including the successful push., (*10)

For testing against my own bitbucket private repo:, (*11)

PRIVATE_REMOTE=https://myusername:mypassword@bitbucket.org/shadiakiki1986/ffa-bdlreports-maps/ PRIVATE_FILE=filename vendor/bin/phpunit tests/GitRestApi/PrivateTest.php

Testing on travis

Check git-data-repo, (*12)

TODO

2016-11-19 * push is not pushing to github * travis not passing, (*13)

The Versions

16/01 2017

dev-master

9999999-dev https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

16/01 2017

0.0.14

0.0.14.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

10/01 2017

0.0.13.5

0.0.13.5 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

10/01 2017

0.0.13.4

0.0.13.4 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

09/01 2017

0.0.13.1

0.0.13.1 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

09/01 2017

0.0.13

0.0.13.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

23/11 2016

0.0.12

0.0.12.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

23/11 2016

0.0.11

0.0.11.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

23/11 2016

0.0.10

0.0.10.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

23/11 2016

0.0.9

0.0.9.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

22/11 2016

0.0.8

0.0.8.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

22/11 2016

0.0.7

0.0.7.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

22/11 2016

0.0.6

0.0.6.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

21/11 2016

0.0.5

0.0.5.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

21/11 2016

0.0.4

0.0.4.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

21/11 2016

0.0.3

0.0.3.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

19/11 2016

0.0.2

0.0.2.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client

18/11 2016

0.0.1

0.0.1.0 https://github.com/shadiakiki1986/git-rest-api-client-php

A php client interfacing with the rest api from node-git-rest-api

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shadi Akiki

api git rest client