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

[OSS101] Task 8: Obtain GitHub tokens to increase request limits #812

Closed
tyn1998 opened this issue May 12, 2024 · 2 comments
Closed

[OSS101] Task 8: Obtain GitHub tokens to increase request limits #812

tyn1998 opened this issue May 12, 2024 · 2 comments

Comments

@tyn1998
Copy link
Member

tyn1998 commented May 12, 2024

Description

Recently, there has been a discussion in the community about GitHub Tokens. In fact, HyperCRX had previously introduced GitHub Tokens to increase the number of requests made to GitHub, as seen in #100. However, in #574, we removed it since there was no longer a frequent need to access the GitHub API.

Considering that HyperCRX may need to frequently access the GitHub API in the future, we need to reintroduce GitHub Tokens with the following specific requirements:

  1. Provide a UI interface allowing users to input their GitHub Tokens.
  2. Securely store user's Tokens.
  3. Encapsulate a network request method that uses the GitHub Token, which will be called by other new features needing to access the GitHub API in the future.

任务描述

近期,社区内又出现了对 GitHub Token 的讨论。事实上,HyperCRX曾经早已引入过 GitHub Token 来增加向 GitHub 发起请求的次数,见 #100。但在 #574,我们将其移除了,因为 HyperCRX 不再有频繁访问 GitHub API 的需求。

考虑到未来 HyperCRX 会出现需要频繁访问 GitHub API 的特性,我们需要重新引入 GitHub Token,具体要求如下:

  1. 提供UI界面,使用户可以输入他们的 GitHub Token
  2. 安全存储用户的 Token
  3. 封装一个使用 GitHub Token 的网络请求方法,该方法未来会被其他需要访问 GitHub API 的新特性调用
@tyn1998 tyn1998 changed the title [OSS101] Task 8: [OSS101] Task 8: Obtain GitHub tokens to increase request limits May 12, 2024
@wblxxx
Copy link
Contributor

wblxxx commented Jun 27, 2024

1.在哪提供输入token的UI界面,插件的扩展选项中吗?
2.ui界面和和存储token,封装网络请求方法分别在代码的那个模块进行增改?
@tyn1998

@wxharry
Copy link
Collaborator

wxharry commented Jun 27, 2024

  1. 输入token的界面应在选项中(options),需要提供输入框和简单的说明(包括为什么我们需要用户提供token,用户该如何生成token,以及token需要哪些权限),可以参考Refined GitHub options页面中的要素,结合我们options页的设计实现
  2. UI界面在src/pages/Options/下。封装网络请求可以放在src/api/下的一个新文件,参考文件夹中的其他文件进行设计。关于token存储,我们有存储用户其他信息的功能,不需要额外设计。可以参考Refined GitHub 是如何存储token的。
    Correct me if I am wrong. @tyn1998

wblxxx added a commit to wblxxx/hypertrons-crx that referenced this issue Jul 21, 2024
wxharry pushed a commit that referenced this issue Aug 3, 2024
* feat:Added functionality to retrieve and save GitHub token (#812)

Signed-off-by: wblx <904653630@qq.com>

* solved all the problems

Signed-off-by: wblx <904653630@qq.com>

* sync

* Resolve inconsistent margins

Signed-off-by: wblx <904653630@qq.com>

* response problem

Signed-off-by: wblx <904653630@qq.com>

* duplicated options

Signed-off-by: wblx <904653630@qq.com>

* chore: run prettier to format

Signed-off-by: Harry <xiaohanwu12@gmail.com>

---------

Signed-off-by: wblx <904653630@qq.com>
Signed-off-by: Harry <xiaohanwu12@gmail.com>
wangyantong2000 pushed a commit to wangyantong2000/hypertrons-crx that referenced this issue Aug 22, 2024
…s#839)

* feat:Added functionality to retrieve and save GitHub token (hypertrons#812)

Signed-off-by: wblx <904653630@qq.com>

* solved all the problems

Signed-off-by: wblx <904653630@qq.com>

* sync

* Resolve inconsistent margins

Signed-off-by: wblx <904653630@qq.com>

* response problem

Signed-off-by: wblx <904653630@qq.com>

* duplicated options

Signed-off-by: wblx <904653630@qq.com>

* chore: run prettier to format

Signed-off-by: Harry <xiaohanwu12@gmail.com>

---------

Signed-off-by: wblx <904653630@qq.com>
Signed-off-by: Harry <xiaohanwu12@gmail.com>
wangyantong2000 added a commit that referenced this issue Aug 27, 2024
* replace with OSGraph

* replace with OSGraph

* fix osgraph

* fix OSGraph

* fix OSGraph

* feat:Added functionality to retrieve and save GitHub token (#839)

* feat:Added functionality to retrieve and save GitHub token (#812)

Signed-off-by: wblx <904653630@qq.com>

* solved all the problems

Signed-off-by: wblx <904653630@qq.com>

* sync

* Resolve inconsistent margins

Signed-off-by: wblx <904653630@qq.com>

* response problem

Signed-off-by: wblx <904653630@qq.com>

* duplicated options

Signed-off-by: wblx <904653630@qq.com>

* chore: run prettier to format

Signed-off-by: Harry <xiaohanwu12@gmail.com>

---------

Signed-off-by: wblx <904653630@qq.com>
Signed-off-by: Harry <xiaohanwu12@gmail.com>

* Update the info about ”GitHub Token Configuration“ (#858)

* update the info in the "GitHub Token Configuration"

* update the info about token

* fix: modify the URL link of the webpage

* fix: modify the URL link of the webpage

* fix: modify page judgment criteria

* fix: modify the URL link of the webpage

fix: modify the URL link of the webpage

fix: modify page judgment criteria

fix: modify page judgment criteria

fix: reserved digits for the length of the contributor bar (#861)

fix: Perceptor tab missing icon (#863)

fix: Perceptor tab is not selected after refreshing (#864)

fix
fix

* code optimization

* style optimization

* modify the jump method

---------

Signed-off-by: wblx <904653630@qq.com>
Signed-off-by: Harry <xiaohanwu12@gmail.com>
Co-authored-by: Sylvan <60059315+wblxxx@users.noreply.github.com>
Co-authored-by: Scarlett Zhao <79428895+HalloMelon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants