------------------------------------------------------------------------------
To reply, visit https://hellosplat.com/s/beanbag/tickets/4816/
------------------------------------------------------------------------------

New ticket #4816 by vernonatsonos
For Beanbag, Inc. > Review Board

Status: New
Tags: Priority:Medium, Type:Defect


------------------------------------------------------------------------------
Cannot add github repo via API
==============================================================================

# What version are you running?
3.0.14

# What's the URL of the page containing the problem?
https://reviewboard.myCompany.com/reviews/api/repositories/

# What steps will reproduce the problem?
1. Verify the name and path of the parameters below
2. Send a post to the URL above with the following json body
```json
{
  "name": "GitHub - myRepoName",
  "path": "[email protected]:myCompany/myRepoName",
  "tool": "git"
}
```


# What is the expected output? What do you see instead?
I end up getting a 400 error with the following output rather than the 
exepected 200 call and a new repository
```json
{
  "fields": {
    "path": ["This field is required"], 
    "tool": ["This field is required"], 
    "name": ["This field is required"]
  }, 
  "stat": "fail", 
  "err": {
    "msg": "One or more fields had errors", 
    "code": 105
  }
}
```

# What operating system are you using? What browser?
I have gotten this response with both Advanced Rest Client and using curl. ARC 
was on Windows 10 and curl was on Ubuntu 16.04.

# Please provide any additional information below.
For reference, this is what I set when I use a get reqeust on an existing 
Github repo. I was able to create this one via the repo creation page just fine.

```json
{
  "stat": "ok", 
  "repository": {
    "name": "GitHub - otherRepo", 
    "links": {
      "info": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/info/";,
        "method": "GET"
      },
      "branches": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/branches/";,
        "method": "GET"
      }, 
      "commits": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/commits/";,
        "method": "GET"
      }, 
      "self": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/";, 
        "method": "GET"
      }, 
      "update": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/";, 
        "method": "PUT"
      }, 
      "diff_file_attachments": {
        "href": 
"https://reviewboard.myCompany.com/reviews/api/repositories/4/diff-file-attachments/";,
 
        "method": "GET"
      }, 
      "delete": {
        "href": "https://reviewboard.myCompany.com/reviews/api/repositories/4/";,
        "method": "DELETE"
      }
    }, 
  "mirror_path": "", 
  "tool": "Git", 
  "visible": true, 
  "bug_tracker": "https://jira.myCompany.com/browse/%s";, 
  "path": "[email protected]:myCompany/otherRepo.git", 
  "id": 4
  }
}
```

------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to