Skip to content

feat: Fast PR#901

Merged
wangyantong2000 merged 14 commits intohypertrons:masterfrom
wangyantong2000:feat/fast-pr
Nov 9, 2024
Merged

feat: Fast PR#901
wangyantong2000 merged 14 commits intohypertrons:masterfrom
wangyantong2000:feat/fast-pr

Conversation

@wangyantong2000
Copy link
Collaborator

Brief Information

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

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • test

Related issues (all available keywords):

Details

iShot_2024-10-29_14.37.08.mp4

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 wangyantong2000 changed the title feat :Fast PR feat: Fast PR Oct 29, 2024
@wangyantong2000 wangyantong2000 marked this pull request as draft October 29, 2024 06:51
@wangyantong2000
Copy link
Collaborator Author

wangyantong2000 commented Nov 6, 2024

Added Gitee's workflow.

iShot_2024-11-06_15.14.58.mp4

@frank-zsy
Copy link
Contributor

@wangyantong2000 Fantastic work

@wangyantong2000
Copy link
Collaborator Author

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

@wangyantong2000 wangyantong2000 marked this pull request as ready for review November 7, 2024 15:41
@frank-zsy
Copy link
Contributor

It looks fantastic, X-lab2017/open-digger-website#64.

There are several things to care about:

  • If user did not set the token, it will fail in the last step when HyperCRX try to create the PR. Actually we should check the token setting when user click the edit button and try to open the editor. If users did not set the token, we should guide them to set the token first.
  • 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.
  • 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.

@wangyantong2000
Copy link
Collaborator Author

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
Copy link
Collaborator Author

wangyantong2000 commented Nov 8, 2024

  • 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
Copy link
Collaborator Author

wangyantong2000 commented Nov 8, 2024

  • 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
Copy link
Contributor

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
Copy link
Collaborator Author

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

@frank-zsy
Copy link
Contributor

LGTM~ Great work.

@frank-zsy
Copy link
Contributor

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

@wangyantong2000
Copy link
Collaborator Author

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

OK

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants