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

[idea] Weekly generator #1

Closed
gaocegege opened this Issue Oct 30, 2016 · 39 comments

Comments

Projects
None yet
7 participants
@gaocegege
Copy link
Member

gaocegege commented Oct 30, 2016

\cc @dyweb/mos

idea issuer: @at15 & @gaocegege & @arrowrowe

ref dyweb/web-stuff#113 (comment)

@gaocegege I think we can use a issue comment template like the following. (Attach the template to the issue so every one can copy and paste it since gh does not have issue comment template)

- tags: php, best-lang
- keywords: hybrid
- link: https://github.com/deuill/go-php
- comment: Use PHP with go
- cc: @ComMouse

(or maybe just use the yaml format) so the bot would be easier to implement

Also using a machine understandable language make it easier to do search and build an interactive gh-page for weekly, for search https://www.algolia.com/ seems to be a good solution.

外国友人 @at15 的 idea

目测要求:

  1. 了解 HTTP/HTTPS 请求
  2. 有一门顺手的比较快糙猛的语言(python, ruby, golang, js, ...)
  3. 可以阅读英文文档
@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Oct 30, 2016

进阶需求:

实现一个诸如 michael/github 的 API 抽象,便于之后为 bot 加 feature

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Nov 1, 2016

这个 idea 可以分为两个部分

一部分是建立一个类似 hook 的机制,能够捕捉到 @ bot 的comment,然后拿到相应的 issue

另外一个部分是拿到 issue 所有的按照 #1 (comment) 的格式的 comment,把他们全部合并成一个 markdown,作为周报提交一个 PR

目标 repo 是 https://github.com/dyweb/weekly

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 1, 2016

需要定义好 comment 格式和合并方式什么的

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Nov 1, 2016

嗯不过我觉得比较麻烦是前面一个,没有一个针对 issue 中的 mention 的webhook

@ComMouse

This comment has been minimized.

Copy link
Member

ComMouse commented Nov 1, 2016

给 repo 加个 issue create 的 webhook 就可以了吧

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 1, 2016

@ComMouse 诶? create 下一期周报 issue 时自动找上一期么?... 倒是也挺机智的 = =

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Nov 1, 2016

忽然想到,不需要,可以按照时间来判断

捂脸

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 1, 2016

......挺好... 每周三 23:59:59 启动, lock, push, close, open......

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 2, 2016

关于 YAML,

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 2, 2016

关于 comment 具体规范.

1. 简单投稿

仍然可以简单地投稿, 例如,

https://github.com/mhagger/git-when-merged the `git when-merged` utility.

被转换为

```yaml
name: https://github.com/mhagger/git-when-merged
link: https://github.com/mhagger/git-when-merged
description: >
    the `git when-merged` utility.
``​`

2. 完整投稿

完整的 Comment 则由 yaml 头和正文组成, 头有: name, type, link, description, quote, cc. 除 name 外都可选, 正文也可选.

  • type 目前有 draft (零碎投稿) 和 topic (专题) 两种, 默认 draft
  • 如果有 link, 为 name 加上
  • 如果有 description, 在 name 后加 , 接上
  • 如果有 quote, 以引用格式附上
  • 如果有 cc (可以是单个用户, 直接逗号分开, 或者写成 list), 挨个 @
  • 可以加 tag / tags / keyword / keywords, 和 cc 一样逗号或 list. 但目前先不约定如何处理.
  • 如果有 name 相同的 comment, 合并起来,
    • link: 覆盖.
    • description, quote, cc, tag(s), keyword(s), 正文: 追加.

3. 例子

完整的例子: (写的时候... 不熟悉的话还是在 Online YAML Parser 里写的好......)

```yaml
name: mhagger/git-when-merged
link: https://github.com/mhagger/git-when-merged
description: >
    the `git when-merged` utility.
quote: >
    `git when-merged` helps you figure out when and why a commit
    was merged into a branch.
cc: gaocegege
``​`
适用于 "为什么我 merge 了一下 master 编译就跪了 / 原来是这个 commit 的锅, 它怎么进 master 的"

处理后为:

  • mhagger/git-when-merged, the git when-merged utility.

    git when-merged helps you figure out when and why a commit was merged into a branch.

    _@arrowrowe:_ 适用于 "为什么我 merge 了一下 master 编译就跪了 / 原来是这个 commit 的锅, 它怎么进 master 的"

    cc @gaocegege

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Nov 3, 2016

LGTM,实现的时候可以先实现第二种完整投稿,再支持简单投稿

@at15

This comment has been minimized.

Copy link
Member

at15 commented Nov 3, 2016

@arrowrowe for the yaml parser, we can have a naive web page like the weekly mail sender using gh-pages, so we can have more control and don't need to see all the ads

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Nov 4, 2016

@at15 agree 😃

@arrowrowe arrowrowe referenced this issue Nov 4, 2016

Closed

Weekly/58 for 2016/11/09 #5

2 of 11 tasks complete
@ComMouse

This comment has been minimized.

Copy link
Member

ComMouse commented Nov 4, 2016

A simple but more expressive version should also be taken into consideration, i.e.:

DongyueWeb
http://dongyueweb.com

The homepage for Dongyue Studio.

> Dongyue Studio is a studio in SJTU.
> - Freshman Friendly
> - Driven by Interest
> - Anything else

Tags: Dongyue, Project

Which is displayed as:

DongyueWeb
http://dongyueweb.com

The homepage for Dongyue Studio.

Dongyue Studio is a studio in SJTU.

  • Freshman Friendly
  • Driven by Interest
  • Anything else

Tags: Dongyue, Project

Or, we may use <!--comment--> to distinguish from different blocks of meta.

@codeworm96

This comment has been minimized.

Copy link
Member

codeworm96 commented Nov 9, 2016

#dibs

@codeworm96

This comment has been minimized.

Copy link
Member

codeworm96 commented Nov 9, 2016

Repository established. You can watch it, if you are interested.

@arrowrowe arrowrowe referenced this issue Nov 23, 2016

Closed

Weekly/61 for 2016/11/30 #8

2 of 11 tasks complete
@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Dec 4, 2016

Has there been any progress on that front? 😺

@codeworm96

This comment has been minimized.

Copy link
Member

codeworm96 commented Dec 4, 2016

@gaocegege All main functional requirements are completed. It can generate weekly for current issues. However, cc MUST be a yaml list for current version, otherwise this field will be skipped.

@JasonQSY

This comment has been minimized.

Copy link
Member

JasonQSY commented Jan 2, 2017

@gaocegege Like PR and issue count which has been used in dyweb/web-stuff or count the total number?

@arrowrowe

This comment has been minimized.

Copy link
Member

arrowrowe commented Jan 3, 2017

Hi @gaocegege, seems that @codeworm96 feel it still incomplete?

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Jan 3, 2017

Yeah, I would reopen it.

@gaocegege gaocegege reopened this Jan 3, 2017

@ComMouse ComMouse referenced this issue Jan 17, 2017

Closed

Weekly/65 for 2017/1/25 #13

2 of 23 tasks complete

@ComMouse ComMouse referenced this issue Jan 25, 2017

Closed

Weekly/66 for 2017/2/8 #14

4 of 24 tasks complete

@ComMouse ComMouse referenced this issue Feb 8, 2017

Closed

Weekly/67 for 2017/2/22 #15

6 of 24 tasks complete

@ComMouse ComMouse referenced this issue Feb 25, 2017

Closed

Weekly/68 for 2017/3/8 #16

1 of 24 tasks complete

@ComMouse ComMouse referenced this issue Mar 9, 2017

Closed

Weekly/69 for 2017/3/22 #17

2 of 24 tasks complete

@ComMouse ComMouse referenced this issue Apr 4, 2017

Closed

Weekly/70 for 2017/4/19 #18

2 of 25 tasks complete

@ComMouse ComMouse added status/done and removed status/claimed labels May 8, 2017

@at15 at15 referenced this issue Jun 28, 2017

Closed

Weekly/71 for 2017/7/5 #20

4 of 25 tasks complete
@ComMouse

This comment has been minimized.

Copy link
Member

ComMouse commented Oct 5, 2017

Done? @gaocegege

@at15

This comment has been minimized.

Copy link
Member

at15 commented Nov 26, 2017

@gaocegege @codeworm96 IMO this issue should be renamed to weekly generator? I was about to open a new issue for GitHub Bot but found this

Done after receiving ack from cece

@at15 at15 changed the title [idea] Github robot [idea] Weekly generator Nov 26, 2017

@at15

This comment has been minimized.

Copy link
Member

at15 commented Mar 23, 2018

@codeworm96 @gaocegege @ComMouse so, what about now?

@codeworm96

This comment has been minimized.

Copy link
Member

codeworm96 commented Mar 24, 2018

Considering to refactor and transfer the repo to dyweb... It there anyone still writes weekly?

@at15

This comment has been minimized.

Copy link
Member

at15 commented Mar 24, 2018

well ... me?

@xplorld

This comment has been minimized.

Copy link
Contributor

xplorld commented Mar 24, 2018

so this is a issue->gh page converter?
maybe we do not need any hook or something, just a static github page reading from github API?

@xplorld

This comment has been minimized.

Copy link
Contributor

xplorld commented Mar 24, 2018

@at15 I mean, why do we even need a piece of server, instead of a static github page, using frontend js to fetch&parse&render?

@at15

This comment has been minimized.

Copy link
Member

at15 commented Mar 24, 2018

@xplorld github API limit and it would be relatively slow to end user. The generator does not need a server, run locally or on a CI system like Travis also works, just publish to gh-pages branch or using https://www.netlify.com/

@xplorld

This comment has been minimized.

Copy link
Contributor

xplorld commented Mar 24, 2018

@at15 sounds promising. However I do not think that we would have enough pageviews to trigger github api limit (逃

@xplorld

This comment has been minimized.

Copy link
Contributor

xplorld commented Mar 24, 2018

is it online now?

@at15

This comment has been minimized.

Copy link
Member

at15 commented Mar 24, 2018

@xplorld if the user has github plugin that show detailed information when hover, he can trigger client API limit easily, it has nothing to do with us, github limits the API rate based on user's ip

@xplorld

This comment has been minimized.

Copy link
Contributor

xplorld commented Mar 24, 2018

cool, seen

@gaocegege

This comment has been minimized.

Copy link
Member Author

gaocegege commented Apr 2, 2018

Thank @codeworm96 for the implementation, although we have no weekly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment