petrosh / diarissues

Get a diary on Issues.
https://petrosh.github.io/diarissues
0 stars 2 forks source link

Parliamone #11

Open petrosh opened 8 years ago

petrosh commented 8 years ago
bottabom commented 8 years ago

parlamento

Get commits and comment count

Use file

path: file url relative to script.

curl "https://api.github.com/repos/parliamone/paliamone.github.io/commits?path=README.md&sha=gh-pages"

[
  {
    "sha": "062c108486f9feb3a24212e7fb2d521e8add12f8",
    "commit": {
      "author": {
        "date": "2016-0824T09:50:13Z"
      },
      "message": "Initial commit",
      "comment_count": 0
    },
    "author": {
      "login": "petrosh",
      "avatar_url": "https://avatars.githubusercontent.com/u/4997583?v=3",
      "type": "User"
    },
    "parents": [

    ]
  }
]

Use label

Pages

Home: post list

get commits and comment count for a path GET /repos/:owner/:repo/commits?path=:path&sha=:branch

Post: clicked a commit SHA

get comments for a commit GET /repos/:owner/:repo/commits/:ref/comments Accept: application/vnd.github.squirrel-girl-preview include reactions payload

"reactions": {
  "url": "https://api.github.com/repos/gabrielecirulli/2048/comments/7690815/reactions",
  "total_count": 0,
  "+1": 0,
  "-1": 0,
  "laugh": 0,
  "hooray": 0,
  "confused": 0,
  "heart": 0
}
petrosh commented 7 years ago

ex Gorum

Supported media types for commit comments

application/vnd.github-commitcomment.raw+json
application/vnd.github-commitcomment.text+json
application/vnd.github-commitcomment.html+json
application/vnd.github-commitcomment.full+json

Get first commit of a repository

GET /repos/:owner/:repo/

GET /repos/:owner/:repo/commits?per_page=1&until=:created_at

Get last commit for a file

GET /repos/:owner/:repo/commits?per_page=1&path=/dir/file.ext

Get a Tree Recursively

GET /repos/:owner/:repo/git/trees/:sha?recursive=1

{
  "sha": "fc6274d15fa3ae2ab983129fb037999f264ba9a7",
  "url": "https://api.github.com/repos/octocat/Hello-World/trees/...",
  "tree": [
    {
      "path": "subdir/file.txt",
      "mode": "100644",
      "type": "blob",
      "size": 132,
      "sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
      "url": "https://api.github.com/repos/octocat/Hello-World/git/..."
    }
  ],
  "truncated": false
}

List commits on a repository

GET /repos/:owner/:repo/commits

[
  {
    "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
    "commit": {
      "message": "Fix all the bugs",
      "comment_count": 0
    }
  }
]

List commit comments for a repository

GET /repos/:owner/:repo/comments

Ordered by ascending ID.

[
  {
    "body": "...",
    "user": {
      "login": "..."
    },
    "created_at": "...",
    "path": "file1.txt",
    "position": 4,
    "line": 14
  }
]

List comments for a single commit

GET /repos/:owner/:repo/commits/:ref/comments

Create a commit comment

POST /repos/:owner/:repo/commits/:sha/comments

The reactions key will have the following payload.

{
  "total_count": 5,
  "+1": 3,
  "-1": 1,
  "laugh": 0,
  "confused": 0,
  "heart": 1,
  "hooray": 0,
  "url": "https://api.github.com/repos/octocat/Hello-World/comments/1/reactions"
}

$ curl "https://api.github.com/repos/jquery/jquery/issues/3080/reactions" -H "Accept: application/vnd.github.squirrel-girl-preview"

get reactions for every comment GET /repos/:owner/:repo/commits/:ref/comments

To access the API you must provide a custom media type in the Accept header: application/vnd.github.squirrel-girl-preview

Issue Locking and Unlocking API Preview Period