ich versuche gerade über das github packages einen issue zu posten:
// Create an issue
$labels = array('bug');
$github->issues->create($user, $repo, 'Found a bug', 'having a problem with this.', 'diddipoeler', '1', $labels);
leider erhalte ich immer den fehler, dass die seite nicht existiert
i use this to post an issue to my repository
// Create an issue
$labels = array('bug');
$github->issues->create($user, $repo, 'Found a bug', 'having a problem with this.', 'diddipoeler', '1', $labels);
but i get an error: page not found.
You imply that this path exists:
'https://api.github.com' . '/repos/' . $user . '/' . $repo . '/issues'
if you replace $user and $repo with the actual value
e.g.
user: joomla
repo: joomla-cms
and add the address directly into your browser e.g.:
https://api.github.com/repos/joomla/joomla-cms/issues
also to see if the code create the correct URL
if you open the network TAB in your browser can you see which URL is being opened ?
Closing as is it nothing to do with the core of joomla
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-05 05:52:01 |
Closed_By | ⇒ | brianteeman |
is this not meant to be used by developers of Joomla extensions ?
https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/github
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/github/github.php
where is the documentation of the library github ?
where are examples of the github library ?
@diddipoeler
about documentation if there is not any,
then you can temporarily modify the library code and
you initial post was a little cryptic you did not say if you are using ?:
class JGithub
and how you instatiated it
neither you have said if you checked that the created URL is correct !!
neither you have provided any other related info to prove an issue
i develope an issue posting in my component.
this is the code:
$github = new JGithub;
// Create an issue
$labels = array('bug');
$github->issues->create('diddipoeler', 'sportsmanagement', 'Found a bug', 'having a problem with this.', 'diddipoeler', '1', $labels);
i get this Information:
Hinweis
JGithubPackageIssues::create 55 path
/repos/diddipoeler/sportsmanagement/issues
JGithubPackageIssues::create 72 data
{"title":"Found a bug","assignee":"diddipoeler","milestone":"1","labels":["bug"],"body":"having a problem with this."}
JGithubPackageIssues::create 73 fetchUrl
https://api.github.com/repos/diddipoeler/sportsmanagement/issues
JGithubPackageIssues::create 76 response
JHttpResponse Object
(
[code] => 404
[headers] => Array
(
[Server] => GitHub.com
[Date] => Tue, 05 Apr 2016 06:24:15 GMT
[Content-Type] => application/json; charset=utf-8
[Content-Length] => 101
[Status] => 404 Not Found
[X-RateLimit-Limit] => 60
[X-RateLimit-Remaining] => 41
[X-RateLimit-Reset] => 1459838564
[X-GitHub-Media-Type] => github.v3
[Access-Control-Expose-Headers] => ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
[Access-Control-Allow-Origin] => *
[Content-Security-Policy] => default-src 'none'
[Strict-Transport-Security] => max-age=31536000; includeSubdomains; preload
[X-Content-Type-Options] => nosniff
[X-Frame-Options] => deny
[X-XSS-Protection] => 1; mode=block
[X-GitHub-Request-Id] => 550D8B0B:15597:91D03:57035A0F
)
[body] => {"message":"Not Found","documentation_url":"https://developer.github.com/v3/issues/#create-an-issue"}
)
GitHub will return 404 Not found instead of 403 if you do not authenticate
Get your token ...
https://developer.github.com/v3/
then use something (i guess) like:
$gh_options = new JRegistry();
$gh_options->set('gh.token', 'your token')
$github = new JGithub($gh_options);
read library source code to find more
Labels |
Added:
?
|
only english please.