आप इसके लिए गिटहब एपीआई का उपयोग कर सकते हैं। एक webhook बनाएँ और एक मुद्दा नीचे दिए तरीक़े जोड़ें: - एक मुद्दा जोड़ने के लिए पोस्ट आदेश से https://developer.github.com/v3/issues/
{
"title": "Found a bug",
"body": "I'm having a problem with this.",
"assignee": "octocat",
"milestone": 1,
"labels": [
"Label1",
"Label2"
]
}
POST /repos/:owner/:repo/issues
उदाहरण तो तुम सब करने की है एक HTTP है।
आप WebRequest का उपयोग करके एक पोस्ट अनुरोध कर सकते हैं।
एपीआई के लिए पूरा विवरण: https://api.github.com/repos/octocat/Hello-World/issues/1347
पूरा सी # -example:
public void CreateBug(Exception ex) {
WebRequest request = WebRequest.Create ("https://api.github.com/repos/yourUserName/YourRepo/issues ");
request.Method = "POST";
string postData = "{'title':'exception occured!', 'body':'{0}','assignee': 'yourUserName'}";
byte[] byteArray = Encoding.UTF8.GetBytes (string.Format(postData,ex));
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write (byteArray, 0, byteArray.Length);
dataStream.Close();
WebResponse response = request.GetResponse();
}
अब आपकी समस्या बना दिया गया है और प्रतिक्रिया GitHub
से प्रतिक्रिया यह "तेजी से होता है , आसान "समाधान। यदि आप गिटहब मुद्दों के साथ और अधिक करना चाहते हैं, तो @ VonC का उत्तर बेहतर हो सकता है क्योंकि यह अधिक ऑब्जेक्ट से संबंधित समाधान
स्रोत
2015-05-21 11:26:32
सी # कोड द्वारा मेरे गीथब भंडार पर मुद्दों को कैसे जोड़ा जाए? – Behzad