bingoogolapple / bga_issue_blog

Flutter 或 Vue 全家桶(Vue + VueRouter + Vuex + Axios)抓取 GitHub 上的 Issues,结合 GitHub Pages 搭建个人博客站点,支持 GitHub 登录和评论
http://www.bingoogolapple.cn
271 stars 52 forks source link

GraphQL API v4 #1

Closed bingoogolapple closed 7 years ago

bingoogolapple commented 7 years ago

用户信息、Labels、总的 Issue 条数

{
  user(login: "bingoogolapple") {
    login
    name
    avatarUrl
    bio
    location
  }
  repository(owner: "bingoogolapple", name: "bingoogolapple.github.io") {
    labels(last: 100) {
      nodes {
        name
        color
      }
    }
    issues(last: 0) {
      totalCount
    }
  }
}
bingoogolapple commented 7 years ago

获取某一条 Issue

{
  repository(owner: "bingoogolapple", name: "bingoogolapple.github.io") {
    issue(number: 174) {
      number
      title
      createdAt
      url
      bodyHTML
      author {
        login
        avatarUrl
        url
      }
      comments(first: 100) {
        nodes {
          bodyHTML
          createdAt
          author {
            login
            avatarUrl
            url
          }
        }
      }
      labels(first: 100) {
        nodes {
          name
          color
        }
      }
    }
  }
}
bingoogolapple commented 7 years ago

Issues 列表

{
  repository(owner: "bingoogolapple", name: "bingoogolapple.github.io") {
    issues(first: 2, states: OPEN, orderBy: {field: CREATED_AT, direction: DESC}) {
      totalCount
      nodes {
        number
        title
        createdAt
        url
        bodyHTML
        author {
          login
          avatarUrl
          url
        }
        comments(first: 100) {
          nodes {
            bodyHTML
            createdAt
            author {
              login
              avatarUrl
              url
            }
          }
        }
        labels(first: 100) {
          nodes {
            name
            color
          }
        }
      }
    }
  }
}
heightzhang commented 7 years ago

楼主,这个可以复制过来搭建自己的issue博客吗

bingoogolapple commented 7 years ago
  1. 克隆该仓库到你自己的 GitHub 中账号
  2. 克隆你自己账号你的该仓库到本地
  3. 根据 README 里的使用说明进行操作
heightzhang commented 7 years ago

感谢~!

heightzhang commented 7 years ago

楼主大大, 因为我没有去注册域名,搭建服务器. 那么,是否能够使用?

bingoogolapple commented 7 years ago

先创建仓库 heightzhang.github.io,在该仓库创建 GitHub Pages 和 Issues,然后就能通过 heightzhang.github.io 访问了