Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: unified api #25

Merged
merged 6 commits into from
Oct 23, 2017
Merged

feat: unified api #25

merged 6 commits into from
Oct 23, 2017

Conversation

xuexb
Copy link
Owner

@xuexb xuexb commented Oct 22, 2017

  1. 统一 github 调用 api:(异常在内部处理,对外透明)
    • 如果是获取数据,则必须有返回值,可以是 [] 或者 null
    • 如果是创建数据,则成功时返回 true ,失败则返回 false
  2. 删除之前使用 git clone 方式的代码
  3. 修改 commit author 获取字段

// 如果只有一个 tag 则没法对比,忽略
if (tags.length < 2) {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果只有一个 tag 可以和 initial commit 对比呀。

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,不过 github api 需要调用 https://api.github.com/repos/xuexb/github-bot/commits 且来获取 response.header.Link 中的 last 再去获取该接口的第一个 commit ,步骤比较繁琐,下个 PR 里修复下吧~

@yugasun yugasun merged commit de65b9a into master Oct 23, 2017
@xuexb xuexb deleted the dev branch October 23, 2017 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants