Skip to main content

本地快速浏览 Github issue/pr,查看新增 comment/issue/pr/response

Project description

local-github

本地快速浏览 Github issue/pr,查看新增 comment/issue/pr

在线体验:https://luzhixing12345.github.io/local-github/

这个项目的起因是在网页端浏览 Github repo 的 issue/pr 之间切换比较慢,因为每次都要重新发起请求。而且作为一个非 member 也不想时时刻刻 watch 新增 issue/pr/comment 收到一堆邮件,但又想知道有哪些内容更新了,谁新增了回复,谁提交了新的 issue/pr,哪些 issue/pr 的 状态更改了,所以诞生了这个项目

基本思路是通过 Github API 获取开源仓库的所有issue/pr信息保存到本地 json,然后本地生成静态页面浏览。考虑到绝大部分项目的 update 没有那么频繁,所以这种把数据拉到本地查看的方案也还好。这个项目的页面完全仿照 Github 的页面,几乎可以说 1:1 复刻,然后去掉了一些不重要的组件。

Quick start

pip install local_github

同步数据前,需要在当前目录创建 .github-token 文件:

  1. 打开 https://github.com/settings/tokens/new 创建 Personal Access Token,使用个人 Access Token 后抓取 Github 信息没有限制,否则有爬取速率的限制
  2. 给一个读仓库的权限

.github-token 已被 .gitignore 忽略,请勿将 Token 提交到版本控制。

同步仓库信息

使用 sync 同步一个仓库的信息,此过程会获取所有的 issue/issue comments/pr/pr comments

local-github sync owner/repo

# local-github sync https://github.com/TencentCloud/CubeSandbox

同步数据后会自动构建静态网页,打开本地的一个 http 服务器,并给出一个 Url 链接

下载的仓库数据保存在 docs/data/github/<owner>/<repo>,与生成的静态网页统一放在 docs 目录下。

初次构建获取数据量很大的话会比较慢,之后的再次 sync 都是增量获取会很快

如果只是希望查看网页不需要同步可以使用 server

local-github server

相关功能介绍

  • pr 一栏默认不会展示 code diff 的信息,需要手动点击 load diff 之后才会获取并展示
  • news 一栏中可以看到两次 sync 之间的差异,有哪些 issue/pr/comment 更新了
  • 可以直接在搜索框输入查询对应的 issue/pr,也可以搜索用户名查询某个用户参与的issue/pr/comment
  • 可以在 assignee 中查询 issue/pr 被指定的对象进行集中处理
  • issue/pr 都有一个跳转的小图标,可以直接跳转到对应的 Github 页面进行处理

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

local_github-0.1.5.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

local_github-0.1.5-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file local_github-0.1.5.tar.gz.

File metadata

  • Download URL: local_github-0.1.5.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.14 Darwin/25.5.0

File hashes

Hashes for local_github-0.1.5.tar.gz
Algorithm Hash digest
SHA256 258582fd5c7dfe08df14b3145e7883188ee1d33913ed171bbc992df421aede7a
MD5 bb185a5d6a2330958f30c406565fe7f3
BLAKE2b-256 d1786e4b4bc9e2b55c0d233d367a83f95cee1c6a8835bab3604ba7c5eaabf5f4

See more details on using hashes here.

File details

Details for the file local_github-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: local_github-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.14 Darwin/25.5.0

File hashes

Hashes for local_github-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5e428bd45c75b3827651761da31154e59ac76f9bc09d77863172bcb1726d30
MD5 87ccf2aa5061b776dd152616171de729
BLAKE2b-256 3c5355f50b18866733f0d0b5f2db2a33d650cff26c4861ef053d4b74ef0fe851

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page