Skip to main content

本周项目:Jasper

· 10 min read

本周,我们采访了 Jasper 的创建者,Jasper 是一款基于 Electron 的 GitHub 通知管理工具。

¥This week we interviewed the creator of Jasper, an Electron-based tool for managing GitHub notifications.


你好!你是谁?

¥Hello! Who are you?

我是 Ryo Maruyama,日本的一名软件开发者。我正在开发 JasperESDoc

¥I'm Ryo Maruyama, a software developer in Japan. I am developing Jasper and ESDoc.

什么是 Jasper?

¥What is Jasper?

Jasper 是一个灵活而强大的 GitHub 问题阅读器。它支持 github.com 和 GitHub Enterprise 上的 issue 和 pull request。

¥Jasper is a flexible and powerful issue reader for GitHub. It supports issues and pull requests on github.com and GitHub Enterprise.

Jasper App Screenshot

为什么要这样做?

¥Why did you make it?

当人们在工作或 OSS 活动中使用 GitHub 时,他们往往每天都会收到许多通知。作为订阅通知的方式,GitHub 提供了电子邮件和 网页通知。我使用了这些版本几年,但遇到了以下问题:

¥When people use GitHub in their job or OSS activities, they tend to receive many notifications on a daily basis. As a way to subscribe to the notifications, GitHub provides email and web notifications. I used these for a couple of years, but I faced the following problems:

  • 我很容易忽略别人提到我、我评论过或我正在关注的问题。

    ¥It's easy to overlook issues where I was mentioned, I commented, or I am watching.

  • 我把一些问题记在脑子里,以便以后检查,但有时我会忘记它们。

    ¥I put some issues in a corner of my head to check later, but I sometimes forget about them.

  • 为了避免忘记问题,我会在浏览器中保持多个标签页打开。

    ¥To not forget issues, I keep many tabs open in my browser.

  • 很难检查所有与我相关的问题。

    ¥It's hard to check all issues that are related to me.

  • 很难掌握团队的所有活动。

    ¥It's hard to grasp all of my team's activity.

我花费了大量时间和精力来避免这些问题,因此我决定为 GitHub 创建一个问题阅读器来有效地解决这些问题,并开始开发 Jasper。

¥I was spending a lot of time and energy trying to prevent those problems, so I decided to make an issue reader for GitHub to solve these problems efficiently, and started developing Jasper.

谁在使用 Jasper?

¥Who's using Jasper?

Jasper 已被多家使用 GitHub 的公司的开发者、设计师和经理所采用。当然,一些 OSS 开发者也在使用它。GitHub 上的一些人也在使用它!

¥Jasper is used by developers, designers, and managers in several companies that are using GitHub. Of course, some OSS developers also are using it. And it is also used by some people at GitHub!

Jasper 如何工作?

¥How does Jasper work?

Jasper 配置完成后,将出现以下屏幕。从左到右,你可以看到 "流列表"、"问题列表" 和 "问题正文"。

¥Once Jasper is configured, the following screen appears. From left to right, you can see "streams list", "issues list" and "issue body".

Jasper Start Screen

此 "stream" 是 Jasper 的核心功能。例如,如果你想查看 "在 electron/electron 代码库中分配给 @zeke 的问题",你可以创建以下流:

¥This "stream" is the core feature of Jasper. For example, if you want to see "issues that are assigned to @zeke in the electron/electron repository", you create the following stream:

repo:electron/electron assignee:zeke is:issue

Jasper Start Screen 2

创建流并等待几秒钟后,你可以看到符合条件的问题。

¥After creating the stream and waiting for a few seconds, you can see the issues that meet the conditions.

Jasper Start Screen 3

我们能用流做什么?

¥What can we do with streams?

我将介绍哪些类型的条件可用于流。

¥I will introduce what kind of conditions can be used for stream.

用户和团队

¥Users and Teams

问题
mentions:cat mentions:dog提及用户 catdog 的问题
author:cat author:dog用户 catdog 创建的问题
assignee:cat assignee:dog分配给 catdog 的问题
commenter:cat commenter:dogcatdog 评论过的问题
involves:cat involves:dog"involve"、catbob 中的问题
team:animal/white-cat team:animal/black-doganimal/white-catanimal/black-dog 提及的问题

involves 表示 mentionauthorassigneecommenter

¥involves means mention, author, assignee or commenter

代码库和组织

¥Repositories and Organizations

问题
repo:cat/jump repo:dog/runcat/jumpdog/run 中的问题
org:electron user:cat user:dogelectroncatdog 中的问题

orguser 相同

¥org is same as user

属性

¥Attributes

问题
repo:cat/jump milestone:v1.0.0 milestone:v1.0.1cat/jump 中附加到 v1.0.0v1.0.1 的问题
repo:cat/jump label:bug label:blockercat/jump 中附加到 bugblocker 的问题
electron OR atomshell包含 electronatomshell 的问题

审核状态

¥Review Status

问题
is:pr review:requiredcat/jump 中需要审核的问题
is:pr review-requested:catcat 请求审核的问题。
但这些尚未审核。
is:pr reviewed-by:catcat 已审核的问题

你可能已经注意到,流可以使用 GitHub 的搜索查询。有关如何使用流和搜索查询的详细信息,请参阅以下 URL。

¥As you may have noticed by looking at these, streams can use GitHub's search queries. For details on how to use streams and search queries, see the following URLs.

Jasper 还具有未读问题管理、未读评论管理、标记星标、通知更新、问题过滤、键盘快捷键等功能。

¥Jasper also has features for unread issue management, unread comment management, marking stars, notification updating, filtering issues, keyboard shortcuts, etc.

Jasper 是付费产品吗?费用是多少?

¥Is Jasper a paid product? How much does it cost?

Jasper 售价 12 美元。但是,你可以使用 免费试用版 30 天。

¥Jasper is $12. However you can use the free trial edition for 30 days.

为什么选择在 Electron 上构建 Jasper?

¥Why did you choose to build Jasper on Electron?

我喜欢 Electron 的以下几个方面:

¥I like the following aspects of Electron:

  • 应用可以使用 JavaScript/CSS/HTML 开发。

    ¥Apps can be developed with JavaScript/CSS/HTML.

  • 应用可以构建于 Windows、Mac 和 Linux 平台。

    ¥Apps can be built for Windows, Mac, and Linux platforms.

  • Electron 正在积极开发中,并拥有庞大的社区。

    ¥Electron is actively developed and has a large community.

这些功能使快速简便的桌面应用开发成为可能。太棒了!如果你有任何产品创意,请务必考虑使用 Electron。

¥These features enable rapid and simple desktop application development. It is awesome! If you have any product idea, you should consider using Electron by all means.

在开发 Jasper 的过程中,你遇到了哪些挑战?

¥What are some challenges you've faced while developing Jasper?

我费了好大劲才弄清楚 "stream" 的概念。起初我考虑使用 GitHub 的 通知 API。但是我注意到它不支持某些用例。之后,除了通知 API 之外,我还考虑使用 问题 API拉取请求 API。但它从未达到我的预期。然后,在思考各种方法时,我意识到轮询 GitHub 的 搜索 API 将提供最大的灵活性。我花了大约一个月的时间进行实验才达到这个目标,然后我用两天时间实现了一个带有流概念的 Jasper 原型。

¥I had a hard time figuring out the "stream" concept. At first I considered using GitHub's Notifications API. However I noticed that it does not support certain use cases. After that I considered using the Issues API and Pull Requests API, in addition to the Notification API. But it never became what I wanted. Then while thinking about various methods, I realized that polling GitHub's Search API would offer the most flexibility. It took about a month of experimentation to get to this point, then I implemented a prototype of Jasper with the stream concept in two days.

注意:轮询次数最多限制为每 10 秒一次。这对于 GitHub API 的限制来说已经足够了。

¥Note: The polling is limited to once every 10 seconds at most. This is acceptable enough for the restriction of GitHub API.

下一步计划是什么?

¥What's coming next?

我计划开发以下功能:

¥I have a plan to develop the following features:

  • 过滤流:流中包含一些经过过滤的流,用于过滤流中的问题。它就像 SQL 的视图。

    ¥A filtered stream: A stream has some filtered stream that filter issues in the stream. It is like as view of SQL.

  • 多个账户:你将能够同时使用 github.com 和 GHE

    ¥Multiple accounts: you will be able to use both github.com and GHE

  • 提升性能:目前,WebView 的加载速度比普通浏览器慢。

    ¥Improve performance: For now the loading a issue in WebView is low speed than normal browser.

在 Twitter 上关注 @jasperappio 获取最新动态。

¥Follow @jasperappio on Twitter for updates.