Utilisez simplement python-redmine
La bibliothèque utilisée dans le script suivant est
! /usr/bin/env python -*- coding: utf-8 -*- from pit import Pit from redmine import Redmine # needs python-redmine (execute the command "pip instsall python-redmine") def main(): conf = Pit.get('redmine', {'require': {'url': '', 'username': '', 'password': '', }}) url = conf['url'] username = conf['username'] password = conf['password'] redmine = Redmine(url, username=username, password=password) issue = redmine.issue.new() issue.project_id = 'project' issue.subject = u'test ' issue.tracker_id = 12 # tracker issue.description = u'test ' issue.status_id = 1 # statut issue.assigned_to_id = 51 # Responsable issue.save() if __name__ == '__main__': main()
Recommended Posts