mochi5o / TIL

Today I learned
0 stars 0 forks source link

新規issueを立ててみる #15

Open mochi5o opened 3 years ago

mochi5o commented 3 years ago

クリエイトしてからクローズするまでのパラメータをAPIから取得するためのテスト。

mochi5o commented 3 years ago

リクエストとレスポンスはこんな感じ

 ❯❯❯ curl -i https://api.github.com/repos/mochi5o/TIL/issues
HTTP/2 200
date: Tue, 26 Jan 2021 12:36:54 GMT
content-type: application/json; charset=utf-8
server: GitHub.com
status: 200 OK
cache-control: public, max-age=60, s-maxage=60
vary: Accept, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding
etag: W/"b8a9a0d7b7aec0b6573da2d17c4cb2a95befe20efece9c25ba9ce45266056b43"
x-github-media-type: github.v3; format=json
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'
x-ratelimit-limit: 60
x-ratelimit-remaining: 49
x-ratelimit-reset: 1611667436
x-ratelimit-used: 11
accept-ranges: bytes
x-github-request-id: C64B:22EC:1CDBA8:215731:60100CE6

[
  {
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/15",
    "repository_url": "https://api.github.com/repos/mochi5o/TIL",
    "labels_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/labels{/name}",
    "comments_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/comments",
    "events_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/events",
    "html_url": "https://github.com/mochi5o/TIL/issues/15",
    "id": 794191338,
    "node_id": "MDU6SXNzdWU3OTQxOTEzMzg=",
    "number": 15,
    "title": "新規issueを立ててみる",
    "user": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [
      {
        "id": 1848796988,
        "node_id": "MDU6TGFiZWwxODQ4Nzk2OTg4",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/enhancement",
        "name": "enhancement",
        "color": "a2eeef",
        "default": true,
        "description": "New feature or request"
      },
      {
        "id": 1848796992,
        "node_id": "MDU6TGFiZWwxODQ4Nzk2OTky",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/good%20first%20issue",
        "name": "good first issue",
        "color": "7057ff",
        "default": true,
        "description": "Good for newcomers"
      }
    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 0,
    "created_at": "2021-01-26T12:25:53Z",
    "updated_at": "2021-01-26T12:26:03Z",
    "closed_at": null,
    "author_association": "OWNER",
    "active_lock_reason": null,
    "body": "クリエイトしてからクローズするまでのパラメータをAPIから取得するためのテスト。\r\n",
    "performed_via_github_app": null
  },
  {
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/14",
    "repository_url": "https://api.github.com/repos/mochi5o/TIL",
    "labels_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/labels{/name}",
    "comments_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/comments",
    "events_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/events",
    "html_url": "https://github.com/mochi5o/TIL/pull/14",
    "id": 699313944,
    "node_id": "MDExOlB1bGxSZXF1ZXN0NDg1MDY5MDEw",
    "number": 14,
    "title": "Bump http-proxy from 1.18.0 to 1.18.1 in /my-react",
    "user": {
      "login": "dependabot[bot]",
      "id": 49699333,
      "node_id": "MDM6Qm90NDk2OTkzMzM=",
      "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/dependabot%5Bbot%5D",
      "html_url": "https://github.com/apps/dependabot",
      "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
      "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
      "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
      "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
      "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
      "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
      "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
      "type": "Bot",
      "site_admin": false
    },
    "labels": [
      {
        "id": 2120213879,
        "node_id": "MDU6TGFiZWwyMTIwMjEzODc5",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/dependencies",
        "name": "dependencies",
        "color": "0366d6",
        "default": false,
        "description": "Pull requests that update a dependency file"
      }
    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 0,
    "created_at": "2020-09-11T13:22:59Z",
    "updated_at": "2020-09-11T13:23:00Z",
    "closed_at": null,
    "author_association": "CONTRIBUTOR",
    "active_lock_reason": null,
    "pull_request": {
      "url": "https://api.github.com/repos/mochi5o/TIL/pulls/14",
      "html_url": "https://github.com/mochi5o/TIL/pull/14",
      "diff_url": "https://github.com/mochi5o/TIL/pull/14.diff",
      "patch_url": "https://github.com/mochi5o/TIL/pull/14.patch"
    },
    "body": "Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.\n<details>\n<summary>Changelog</summary>\n<p><em>Sourced from <a href=\"https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md\">http-proxy's changelog</a>.</em></p>\n<blockquote>\n<h2><a href=\"https://github.com/http-party/node-http-proxy/compare/1.18.0...v1.18.1\">v1.18.1</a> - 2020-05-17</h2>\n<h3>Merged</h3>\n<ul>\n<li>Skip sending the proxyReq event when the expect header is present <a href=\"https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1447\"><code>[#1447](https://github.com/http-party/node-http-proxy/issues/1447)</code></a></li>\n<li>Remove node6 support, add node12 to build <a href=\"https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1397\"><code>[#1397](https://github.com/http-party/node-http-proxy/issues/1397)</code></a></li>\n</ul>\n</blockquote>\n</details>\n<details>\n<summary>Commits</summary>\n<ul>\n<li><a href=\"https://github.com/http-party/node-http-proxy/commit/9b96cd725127a024dabebec6c7ea8c807272223d\"><code>9b96cd7</code></a> 1.18.1</li>\n<li><a href=\"https://github.com/http-party/node-http-proxy/commit/335aeeba2f0c286dc89c402eeb76af47834c89a3\"><code>335aeeb</code></a> Skip sending the proxyReq event when the expect header is present (<a href=\"https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1447\">#1447</a>)</li>\n<li><a href=\"https://github.com/http-party/node-http-proxy/commit/dba39668ba4c9ad461316e834b2d64b77e1ca88e\"><code>dba3966</code></a> Remove node6 support, add node12 to build (<a href=\"https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1397\">#1397</a>)</li>\n<li>See full diff in <a href=\"https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1\">compare view</a></li>\n</ul>\n</details>\n<br />\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=http-proxy&package-manager=npm_and_yarn&previous-version=1.18.0&new-version=1.18.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n<details>\n<summary>Dependabot commands and options</summary>\n<br />\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language\n- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language\n- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language\n- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language\n\nYou can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mochi5o/TIL/network/alerts).\n\n</details>",
    "performed_via_github_app": null
  }
]
 ❯❯❯
mochi5o commented 3 years ago
~ ❯❯❯ curl https://api.github.com/repos/mochi5o/TIL/issues
[
  {
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/15",
    "repository_url": "https://api.github.com/repos/mochi5o/TIL",
    "labels_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/labels{/name}",
    "comments_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/comments",
    "events_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/events",
    "html_url": "https://github.com/mochi5o/TIL/issues/15",
    "id": 794191338,
    "node_id": "MDU6SXNzdWU3OTQxOTEzMzg=",
    "number": 15,
    "title": "新規issueを立ててみる",
    "user": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [
      {
        "id": 2120213879,
        "node_id": "MDU6TGFiZWwyMTIwMjEzODc5",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/dependencies",
        "name": "dependencies",
        "color": "0366d6",
        "default": false,
        "description": "Pull requests that update a dependency file"
      },
      {
        "id": 1848796992,
        "node_id": "MDU6TGFiZWwxODQ4Nzk2OTky",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/good%20first%20issue",
        "name": "good first issue",
        "color": "7057ff",
        "default": true,
        "description": "Good for newcomers"
      }
    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 1,
    "created_at": "2021-01-26T12:25:53Z",
    "updated_at": "2021-01-26T12:38:53Z",
    "closed_at": null,
    "author_association": "OWNER",
    "active_lock_reason": null,
    "body": "クリエイトしてからクローズするまでのパラメータをAPIから取得するためのテスト。\r\n",
    "performed_via_github_app": null
  },
  {
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/14",
    "repository_url": "https://api.github.com/repos/mochi5o/TIL",
    "labels_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/labels{/name}",
    "comments_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/comments",
    "events_url": "https://api.github.com/repos/mochi5o/TIL/issues/14/events",
    "html_url": "https://github.com/mochi5o/TIL/pull/14",
    "id": 699313944,
    "node_id": "MDExOlB1bGxSZXF1ZXN0NDg1MDY5MDEw",
    "number": 14,
    "title": "Bump http-proxy from 1.18.0 to 1.18.1 in /my-react",
    "user": {
      "login": "dependabot[bot]",
      "id": 49699333,
      "node_id": "MDM6Qm90NDk2OTkzMzM=",
      "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/dependabot%5Bbot%5D",
      "html_url": "https://github.com/apps/dependabot",
      "followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
      "following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
      "gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
      "organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
      "repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
      "events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
      "received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
      "type": "Bot",
      "site_admin": false
    },
    "labels": [
      {
        "id": 2120213879,
        "node_id": "MDU6TGFiZWwyMTIwMjEzODc5",
        "url": "https://api.github.com/repos/mochi5o/TIL/labels/dependencies",
        "name": "dependencies",
        "color": "0366d6",
        "default": false,
        "description": "Pull requests that update a dependency file"
      }
    ],
    "state": "open",
    "locked": false,
    "assignee": null,
    "assignees": [

    ],
    "milestone": null,
    "comments": 0,
    "created_at": "2020-09-11T13:22:59Z",
    "updated_at": "2020-09-11T13:23:00Z",
    "closed_at": null,
    "author_association": "CONTRIBUTOR",
    "active_lock_reason": null,
    "pull_request": {
      "url": "https://api.github.com/repos/mochi5o/TIL/pulls/14",
      "html_url": "https://github.com/mochi5o/TIL/pull/14",
      "diff_url": "https://github.com/mochi5o/TIL/pull/14.diff",
      "patch_url": "https://github.com/mochi5o/TIL/pull/14.patch"
    },
  body 省略
  }
]
~ ❯❯❯
mochi5o commented 3 years ago

コメントするとAPIのレスポンスが変わる?

mochi5o commented 3 years ago

リクエストを投げるのはissueクローズのあと。 そして当該issueのissueのデータとeventデータを取得

~ ❯❯❯ curl https://api.github.com/repos/mochi5o/TIL/issues/15
~ ❯❯❯ curl https://api.github.com/repos/mochi5o/TIL/issues/15/events

eventだけで取得するとissueの基本情報が取得できない

~ ❯❯❯ curl https://api.github.com/repos/mochi5o/TIL/issues/15/events
[
  {
    "id": 4250428053,
    "node_id": "MDEyOkxhYmVsZWRFdmVudDQyNTA0MjgwNTM=",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250428053",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "labeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:26:03Z",
    "label": {
      "name": "enhancement",
      "color": "a2eeef"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250428056,
    "node_id": "MDEyOkxhYmVsZWRFdmVudDQyNTA0MjgwNTY=",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250428056",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "labeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:26:03Z",
    "label": {
      "name": "good first issue",
      "color": "7057ff"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250474883,
    "node_id": "MDE0OlVubGFiZWxlZEV2ZW50NDI1MDQ3NDg4Mw==",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250474883",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "unlabeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:38:53Z",
    "label": {
      "name": "enhancement",
      "color": "a2eeef"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250474884,
    "node_id": "MDEyOkxhYmVsZWRFdmVudDQyNTA0NzQ4ODQ=",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250474884",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "labeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:38:53Z",
    "label": {
      "name": "dependencies",
      "color": "0366d6"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250506795,
    "node_id": "MDE0OlVubGFiZWxlZEV2ZW50NDI1MDUwNjc5NQ==",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250506795",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "unlabeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:47:51Z",
    "label": {
      "name": "dependencies",
      "color": "0366d6"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250506798,
    "node_id": "MDE0OlVubGFiZWxlZEV2ZW50NDI1MDUwNjc5OA==",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250506798",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "unlabeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:47:51Z",
    "label": {
      "name": "good first issue",
      "color": "7057ff"
    },
    "performed_via_github_app": null
  },
  {
    "id": 4250506799,
    "node_id": "MDEyOkxhYmVsZWRFdmVudDQyNTA1MDY3OTk=",
    "url": "https://api.github.com/repos/mochi5o/TIL/issues/events/4250506799",
    "actor": {
      "login": "mochi5o",
      "id": 41158022,
      "node_id": "MDQ6VXNlcjQxMTU4MDIy",
      "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mochi5o",
      "html_url": "https://github.com/mochi5o",
      "followers_url": "https://api.github.com/users/mochi5o/followers",
      "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
      "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
      "organizations_url": "https://api.github.com/users/mochi5o/orgs",
      "repos_url": "https://api.github.com/users/mochi5o/repos",
      "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mochi5o/received_events",
      "type": "User",
      "site_admin": false
    },
    "event": "labeled",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2021-01-26T12:47:51Z",
    "label": {
      "name": "documentation",
      "color": "0075ca"
    },
    "performed_via_github_app": null
  }
]
~ ❯❯❯
mochi5o commented 3 years ago
~ ❯❯❯ curl https://api.github.com/repos/mochi5o/TIL/issues/15
{
  "url": "https://api.github.com/repos/mochi5o/TIL/issues/15",
  "repository_url": "https://api.github.com/repos/mochi5o/TIL",
  "labels_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/labels{/name}",
  "comments_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/comments",
  "events_url": "https://api.github.com/repos/mochi5o/TIL/issues/15/events",
  "html_url": "https://github.com/mochi5o/TIL/issues/15",
  "id": 794191338,
  "node_id": "MDU6SXNzdWU3OTQxOTEzMzg=",
  "number": 15,
  "title": "新規issueを立ててみる",
  "user": {
    "login": "mochi5o",
    "id": 41158022,
    "node_id": "MDQ6VXNlcjQxMTU4MDIy",
    "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/mochi5o",
    "html_url": "https://github.com/mochi5o",
    "followers_url": "https://api.github.com/users/mochi5o/followers",
    "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
    "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
    "organizations_url": "https://api.github.com/users/mochi5o/orgs",
    "repos_url": "https://api.github.com/users/mochi5o/repos",
    "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
    "received_events_url": "https://api.github.com/users/mochi5o/received_events",
    "type": "User",
    "site_admin": false
  },
  "labels": [
    {
      "id": 1848796985,
      "node_id": "MDU6TGFiZWwxODQ4Nzk2OTg1",
      "url": "https://api.github.com/repos/mochi5o/TIL/labels/documentation",
      "name": "documentation",
      "color": "0075ca",
      "default": true,
      "description": "Improvements or additions to documentation"
    }
  ],
  "state": "closed",
  "locked": false,
  "assignee": null,
  "assignees": [

  ],
  "milestone": null,
  "comments": 5,
  "created_at": "2021-01-26T12:25:53Z",
  "updated_at": "2021-01-26T13:09:26Z",
  "closed_at": "2021-01-26T13:09:26Z",
  "author_association": "OWNER",
  "active_lock_reason": null,
  "body": "クリエイトしてからクローズするまでのパラメータをAPIから取得するためのテスト。\r\n",
  "closed_by": {
    "login": "mochi5o",
    "id": 41158022,
    "node_id": "MDQ6VXNlcjQxMTU4MDIy",
    "avatar_url": "https://avatars.githubusercontent.com/u/41158022?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/mochi5o",
    "html_url": "https://github.com/mochi5o",
    "followers_url": "https://api.github.com/users/mochi5o/followers",
    "following_url": "https://api.github.com/users/mochi5o/following{/other_user}",
    "gists_url": "https://api.github.com/users/mochi5o/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/mochi5o/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/mochi5o/subscriptions",
    "organizations_url": "https://api.github.com/users/mochi5o/orgs",
    "repos_url": "https://api.github.com/users/mochi5o/repos",
    "events_url": "https://api.github.com/users/mochi5o/events{/privacy}",
    "received_events_url": "https://api.github.com/users/mochi5o/received_events",
    "type": "User",
    "site_admin": false
  },
  "performed_via_github_app": null
}

issue番号を指定すると概要が取得できるのか。 使いそうな値はこのあたりか

"html_url": "https://github.com/mochi5o/TIL/issues/15", "title": "新規issueを立ててみる", "created_at": "2021-01-26T12:25:53Z", "updated_at": "2021-01-26T13:09:26Z", "closed_at": "2021-01-26T13:09:26Z",