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

feat: Mimicking getting data on github #924

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xsy41
Copy link
Collaborator

@Xsy41 Xsy41 commented Nov 17, 2024

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

In preparation for HyperCRX to adapt to Gitee platform, similar to Github platform to get data and so on, changed the relevant get data file.

Checklist

Others

@wangyantong2000
Copy link
Collaborator

I think it is necessary to separate the files for each feature into folders on different platforms and consider their necessity. Is it too redundant, as many files (such as view files) are platform independent and only require passing different data and finding different elements on the page.

@wangyantong2000
Copy link
Collaborator

Would it be more convenient to extract different file retrieval functions and page element retrieval functions from the index file in each functional folder and extract them to different files within that folder. Otherwise, when changing the component itself, files in two different platform folders will need to be modified simultaneously.

@Xsy41
Copy link
Collaborator Author

Xsy41 commented Nov 17, 2024

Would it be more convenient to extract different file retrieval functions and page element retrieval functions from the index file in each functional folder and extract them to different files within that folder. Otherwise, when changing the component itself, files in two different platform folders will need to be modified simultaneously.

Yes, that makes sense, the different platform functions that get elements and the functions that get data can be extracted, under each function folder, divided into github.ts and gitee.ts.

@wangyantong2000
Copy link
Collaborator

I will revise and refactor this again.

@wangyantong2000
Copy link
Collaborator

Due to the need for a major refactoring and numerous conflicts between the current PR and the latest version of the project that need to be resolved. Therefore, I am preparing to close this PR and start a new PR to work on.

@Xsy41
Copy link
Collaborator Author

Xsy41 commented Jan 6, 2025

Due to the need for a major refactoring and numerous conflicts between the current PR and the latest version of the project that need to be resolved. Therefore, I am preparing to close this PR and start a new PR to work on.

Yes. That's right.

export async function isDeveloperWithMeta() {
return pageDetect.isUserProfile() && (await metaStore.has(getDeveloperName()));
export async function isDeveloperWithMeta(platform: string) {
return pageDetect.isUserProfile() && (await metaStore.has(platform, getDeveloperName()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PageDetect is a tool in the github-url-detection package used to detect the URL structure of the current Github page. For the Gitee platform, using it this way to determine if it is a developer profile page should be incorrect.Because Gitee and Github have different page structures and URL patterns. Similar methods to using github-url-detection to obtain information may not be effective when migrating to the Gitee platform. You can try it and see if it's like this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I have mentioned several times before in some tasks involving Gitee, and suggested that you can do something about encapsulating the function methods for obtaining user names, project names, and other information on the Gitee platform based on URLs or page elements.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you have free time afterwards, you can make corresponding attempts. At the same time, it is also possible to learn more about the specific methods and techniques used in the project during this process.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During this process, I will also do these things together.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out my problem.I'll follow up on the project.😊

Copy link
Collaborator

@wangyantong2000 wangyantong2000 Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out my problem.I'll follow up on the project.😊

Firstly, prioritize school exams. Wait until the exam is over.

@wangyantong2000
Copy link
Collaborator

It's best to establish a goal plan. Through time planning, we can better arrange things.

Two time points, before the start and end of the next semester.

  • Complete the infrastructure renovation before the project migration starts next semester. In this way, when it comes to the migration of specific functions, everyone can imitate existing functions. In this way, whether it is a course task or a daily task, anyone who wants to participate can join and divide it into small functional tasks for everyone to complete.
  • Complete the overall functional migration before the end of next semester.

Of course, this plan is just a plan. Being able to complete it is the best. The time left should still be quite ample.

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