hypertrons / hypertrons-crx

A browser extension for insights into GitHub, Gitee projects and developers.
https://hypercrx.cn
Apache License 2.0
357 stars 103 forks source link

feat: Fast PR #901

Closed wangyantong2000 closed 2 weeks ago

wangyantong2000 commented 4 weeks ago

Brief Information

This pull request is in the type of (more info about types):

Related issues (all available keywords):

Details

https://github.com/user-attachments/assets/e7701b4f-59a7-49e3-b324-b66f8423aee5

A brand new feature called FastPR. Support quick PR editing and submission of document websites. Defined the corresponding rules between document websites and repositories. Support document repositories in GitHub and Gitee. The process of submitting to GitHub repository is currently underway. The process of Gitee repository is pending submission. And the rule configuration will be transformed into remote pull acquisition.

Checklist

Others

wangyantong2000 commented 2 weeks ago

Added Gitee's workflow.

https://github.com/user-attachments/assets/637ad396-f366-4007-80b3-a4dc7e4a67ee

frank-zsy commented 2 weeks ago

@wangyantong2000 Fantastic work

wangyantong2000 commented 2 weeks ago

The configuration file was changed to be obtained remotely in OSS using the following method. https://developer.chrome.com/docs/extensions/how-to/security/sandboxing-eval

frank-zsy commented 2 weeks ago

It looks fantastic, https://github.com/X-lab2017/open-digger-website/pull/64.

There are several things to care about:

wangyantong2000 commented 2 weeks ago
image

Added a prompt to fill in the token. When clicking the icon, if the token is not filled in, a prompt will appear.

wangyantong2000 commented 2 weeks ago
  • Some of the open source projects requires DCO in the git commit. Which means we need to sign-off the commit or the DCO check will fail like this. This requires to add Signed-off-by: Name <email> in the commit message. If we can retrieve the name and email of current user by token, we should set to the users name and email. Or we can use HyperCRX <contact@x-lab.info> something like this instead to avoid DCO check failure.

For this, GitHub will compare the email address of the submitter with the email information provided. Like this picture.

截屏2024-11-08 19 37 41 image

For users who set their email address as private in the settings, their email address is found to be null in the program, but in reality, GitHub will set the address in their submitted information to xxxxxxx+ username@users.noreply.github.com. This can also lead to mismatched email addresses, which cannot pass DCO.

wangyantong2000 commented 2 weeks ago
  • When does the sandbox page launched for the extension and how does it work for all pages. I ask this because we should consider how HyperCRX aware about the update of the rules file. If we update the rules file, when will the extension start to use the new config and take effect.

This can be changed to retrieve the remote JS file every time the URL is parsed, or to retrieve the remote JS file at regular intervals.

frank-zsy commented 2 weeks ago

I prefer request the remote js file at regular interval like 1 hour. Since network traffic will cost money on our side, so we need to control the request frequency to reduce the cost.

wangyantong2000 commented 2 weeks ago

Added interval. At present, the remote file is pulled every time the fastpr is loaded, and then pulled every hour after loading.

frank-zsy commented 2 weeks ago

LGTM~ Great work.

frank-zsy commented 2 weeks ago

I think we can release the version first and then optimize the user experience in future development.

wangyantong2000 commented 2 weeks ago

I think we can release the version first and then optimize the user experience in future development.

OK