You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Michaël Costa 3aa4d80ab2 Increment version [CI SKIP] 2 months ago
scrippy_git test/gitolite (#3) 4 months ago
tests test/verbosepytest (#8) 4 months ago
.bumpversion.cfg Increment version [CI SKIP] 2 months ago
.drone.yml chore: Remove all refs to GNC 2 months ago
.editorconfig Various config files 4 months ago
.flake8 Various config files 4 months ago
.gitignore First Jenkins build 4 months ago
.pylintrc Various config files 4 months ago
.yamllint Various config files 4 months ago
CONTRIBUTING.md chore: Remove all refs to GNC 2 months ago
LICENSE Various config files 4 months ago
Makefile chore: Remove all refs to GNC 2 months ago
README.md Increment version [CI SKIP] 2 months ago
requirements.txt First Jenkins build 4 months ago
scrippy-git.png First Jenkins build 4 months ago
setup.cfg Increment version [CI SKIP] 2 months ago
setup.py Various config files 4 months ago

README.md

version pylint Build Status License Language

Scrippy, mon ami le scrangourou

scrippy_git

Client Git pour le cadriciel Scrippy.

Avertissement

Ce dépôt est un dépôt public librement distribué y compris sur Internet. Le code qu'il contient ainsi que l'ensemble des configurations et documentations ne doit pas contenir d'informations sensibles telles que, et sans se limiter à, mots de passe et clefs privées.

Prérequis

Modules Python

Liste des modules nécessaires

  • GitPython

Installation

Manuelle

git clone https://git.mcos.nc/scrippy/scrippy-git.git
cd scrippy-git.git
sudo python3 -m pip install -r requirements.txt
make install

Avec pip

sudo pip3 install scrippy-git

Utilisation

Le module scrippy_git.git fournit l'objet Repo facilitant la manipulation d'un dépôt Git.

import os
from scrippy_git import git

username = "git"
host = "gitlab.monty.py"
port = 2242
reponame = "luiggi.vercotti/monty_python.git"
branch = "master"

repo = git.Repo(username, host, port, reponame)
local_path = os.path.join(workspace_path, "monty_python")
repo.clone(branch=branch, path=local_path)

test_fname = os.path.join(local_path, "dead_parrot.txt")
with open(test_fname, mode="w") as test_file:
  test_file.write("Nobody expects the Spanish inquisition !")
  commit_message = "Inquisition shall not be expected"
  repo.commit_push(commit_message)