?
avatar diddipoeler
diddipoeler
4 Apr 2016

Steps to reproduce the issue

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

Expected result

Actual result

System information (as much as possible)

Additional comments

avatar diddipoeler diddipoeler - open - 4 Apr 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Apr 2016

only english please.

avatar diddipoeler
diddipoeler - comment - 4 Apr 2016

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.

avatar ggppdk
ggppdk - comment - 5 Apr 2016

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

  • is the url correct ?

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 ?

avatar brianteeman
brianteeman - comment - 5 Apr 2016

Closing as is it nothing to do with the core of joomla


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9727.

avatar brianteeman brianteeman - close - 5 Apr 2016
avatar brianteeman brianteeman - close - 5 Apr 2016
avatar brianteeman brianteeman - change - 5 Apr 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-04-05 05:52:01
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Apr 2016
avatar diddipoeler
diddipoeler - comment - 5 Apr 2016

where is the documentation of the library github ?
where are examples of the github library ?

avatar ggppdk
ggppdk - comment - 5 Apr 2016

@diddipoeler
about documentation if there is not any,

  • then you can try reading the source code

then you can temporarily modify the library code and

  • print some testing data,
  • find out if it is a bug, and provide some fix here

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

avatar diddipoeler
diddipoeler - comment - 5 Apr 2016

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"}

)

avatar ggppdk
ggppdk - comment - 5 Apr 2016

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

avatar brianteeman brianteeman - change - 22 Apr 2016
Labels Added: ?

Add a Comment

Login with GitHub to post a comment