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

[Discussion] Design our edu hypertrons bot procedure #2

Open
frank-zsy opened this issue Mar 5, 2020 · 11 comments
Open

[Discussion] Design our edu hypertrons bot procedure #2

frank-zsy opened this issue Mar 5, 2020 · 11 comments

Comments

@frank-zsy
Copy link
Contributor

I want to launch a new plugin for hypertrons which is for education purpose.

The main purposes of this plugin are:

  • Teach students how git works, especially about distribution and branch feature.
  • Teach students how to use git, especially about sync among repos and resolve conflicts.
  • Teach students how to use GitHub, especially about issue and pull.

How this can be implemented:

  • After student install the edu-robot on his/her repo, the bot should add several issues to the repo.
    • Welcome issue to introduce the robot and config guide of it.
    • Git learning procedure issue to teach git related knowledge.
    • GitHub learning procedure issue to teach GitHub related knowledge.
    • Open source procedure issue to teach open source related knowledge.
  • The issues should have metadata to trace the learning stage of each issue.
  • When student finish the prior stage, new comment should be made by the robot to lead student to next stage.

We need to design the basic procedures and find out how many features we still lack in Hypertrons and implement them, after that, the plugin should be quite easy to accomplish.

@will-ww
Copy link

will-ww commented Mar 5, 2020

Great ! I can invove other students from ECNU to try to collaberate with this plugin. A good chance to connect to bot and git knowledge.

@liwen-tj
Copy link

liwen-tj commented Mar 8, 2020

Here is a basic design document. Maybe we should first discuss this scheme before going into detailed scheme. Any advice is very welcome.

@frank-zsy
Copy link
Contributor Author

Sorry for the late reply.

I have several suggestions

  • This plugin is not just for schools or universities, so maybe we don't really need a teacher's repo, all open source related knowledges can be learned from a single repo.
  • We need to make sure all the knowledges points should be included in the procedure, like conflicts, we need to make sure student can meet conflicts in the procedure if he/she follows the instruction. And PRs can be made from one branch to another in a single repo, it is not a problem.
  • We may need to design some basic local tools to make sure we can know the local status of the repo, I do not sort it out but I think it is quite necessary.
  • We need to make sure the mechanism is flexible in the future, the basic procedure is not enough for further features. Like we need to add release procedure, wiki maintain, project management into the learning flow.
  • We need to think about some fail safe like what should we do if student edit the issue by hand, if this can break the procedure flow, then we need to find a way to fix the status.

@liwen-tj
Copy link

liwen-tj commented Mar 9, 2020

In point 3, what do you mean by basic local tools? You mean something that is offline and installed on student's own computer?

@sunshinemingo
Copy link

For point 3, I have some ideas:

  • Maybe we provide a public repo for users to fork. Local tools are available in our provided repositories.
  • Maybe it is possible to develop a local tool similar to git. When a user clones the repo locally, after entering a specific command on the command line, he can enter the git environment (similar to entering python to enter the python environment on the command line). At this time, we can obtain local status of the repo, and at the same time, the user can execute the git command in this environment. In this way, if the user executes the git command wrongly, we can also get the error information.
  • Or we can develop a local tool for users to edit the content of files in the repo locally so that we can know the local status of the repo.
  • Or we can develop a local tool to monitor the local state of the repo.

@frank-zsy
Copy link
Contributor Author

@sunshinemingo Yes, that is what I mean, but the hard point is how to develop the tool.

Actually, we don't need to monitor everything in local repo, we only need to add hooks(pre-commit, pre-push) to the local .git config. Then we can check the status if the user what to make some interaction with origin repo.

The most common way to do this is provide a shell script for Linux and a cmd file for Windows, also we can use different programming language to do this, like Python, but this requires Python env in local repo which I think is reasonable, or we can provide different language version like Node.js.

@sunshinemingo
Copy link

Hooks can be divided into two groups: client-side and server-side. Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits.

However, client-side hooks are not copied when a user clones the repository.

@frank-zsy
Copy link
Contributor Author

frank-zsy commented Mar 10, 2020

That is right, but we can make sure it will be inited like we can add scripts to setup hooks when user installs dependencies, I am not sure whether Python can do that but I am quite sure Node.js can in its post install script.

@sunshinemingo
Copy link

So, since we can get the local status of the repo through hooks, maybe it is possible to ensure conflicts by comparing the status of the local repo and remote repo.

If no conflict occurs when a user submits a PR, the remote repo may be able to modify the corresponding files to ensure that a conflict occurs.

@frank-zsy
Copy link
Contributor Author

frank-zsy commented Mar 11, 2020

We can make sure the conflicts occur if users follow the instruction, we should make conflicts by design. Modify file content automatically would be very confusing for users.

@sunshinemingo
Copy link

This is the first version of flowchart. Any advice is very welcome.
edu-bot

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

No branches or pull requests

4 participants