Skip to content

Commit

Permalink
Management process
Browse files Browse the repository at this point in the history
  • Loading branch information
streetycat committed Apr 26, 2023
1 parent 1bfd139 commit 44c3f43
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 0 deletions.
87 changes: 87 additions & 0 deletions Flowchart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
```mermaid
graph TB
subgraph Writer
Fork[Fork branch `draft`]-->Write[Create or update document]-->Post[Post `Pull request` to the official repository]-->Discuss[Create a discussion or issue]-->Wait[Wait feedback]-->Accept{Accept?}--yes-->Done(Done)
Accept--no-->Write
end
Post-->ReadPR
subgraph Merge
ReadPR[Read the `Pull request`]-->ObviousError{Incorrect}--yes-->Reject[Reject]
ObviousError--no-->MergeDraft[Merge to `draft`]
end
Reject-->Wait
MergeDraft-->CheckContent
subgraph Check
CheckContent[Check the `Commits`]-->Incorrect{Incorrect}--yes-->Wait
Incorrect--no-->MakePatch[Make patch]-->MakeVote[Make a vote]
end
subgraph Include
MakeVote-->Score[Set score for `Commits`]-->Passed{Passed}--yes-->MergeChecked[Apply the `Patch` on branch `checked`]-->HighScore{Score is enough}--yes-->IncludeOfficial[Apply the `Patch` on branch `official`]-->Wait
end
HighScore--no-->Wait
Passed--no-->Wait
```

```mermaid
%% 时序图例子,-> 直线,-->虚线,->>实线箭头
sequenceDiagram
participant Writer
participant Merge
participant Check
participant Include
Writer->>Writer: Fork branch `draft`
loop revise
Writer->>Writer: Create or update document
Writer-->>Merge: Post `Pull request` to the official repository
Writer->>Writer: Create a discussion or issue
Writer->>Writer: Wait feedback
Merge->>Merge: Read the `Pull request`
alt There are obvious errors
Merge-->>Writer: Reject
else No obvious errors
Merge-->>Check: Merge to `draft`
end
Check->>Check: Check the `Commits`
alt incorrect
Check-->>Writer: Feedback with the errors
else correct
Check->>Check: Make patch
end
Check-->>Include: Make a vote
Include->>Include: Set score for `Commits`
alt not pass
Include-->>Writer: Feedback with the errors
else pass
Include->>Include: Apply the `Patch` on branch `checked`
end
opt score is enough
Include->>Include: Apply the `Patch` on branch `official`
end
Include-->>Writer: Feedback with congratulate
opt is accepted
Writer->>Writer: break
end
end %% end loop
```
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,44 @@
- Anyone can submit their insights or introductory documents, it may be employed in the official documentation repository.
- You can learn here when you have some problems.
- You can make an issue or discussion when you cannot fix your problem yourself or you found an error.

# How to manage the documents?

- There are 3 branchs in the [repository](https://github.com/buckyos/documents):

| Branch | Description | Inclusion conditions | Manager |
| -------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| official | Documents approved by the team | Accurate content, high level of writing, easy to understand | Senior developers of relevant modules + project administrators |
| checked | Documentation reviewed by the team | The content is accurate, but the writing is flawed and difficult to read | Senior developers of relevant modules or project administrators |
| draft | Unchecked document | There may be errors in the content, which need to be corrected. If you find an error, you can initiate a discussion or submit a `Pull request` to correct it. | Any one can update the repository |

1. When you want to submit a document, you should do as follow:

- Fork the branch `draft` to your own repository.
- Finish your documents, create a new one or update an exist one.
- Post a `Pull request` to the branch `draft` in official repository.
- Wait the team to merge your documents, you can also create a issue or discussion to publish your documents.

2. When someone with `write` permissions find a `Pull request`, he can do as follow:

- If obvious problems are found, reject it and note the reason.
- Otherwise merge it to the branch `draft`.

3. The managers periodically compares `draft` and `checked` branches, They will check the `Commit`s as follow:

- Make a `Patch` include the proofreaded `Commit`s in the `draft` branch.
- Ignore the `Commit`s with errors and feedback to the writer(create a discussion and @ the auther?).

4. How to decide to include the `Patch`?

- Issue a vote on `Patch`, the lead developers of related modules and managers are invited to join.
- They will give each commit a score while voting.
- If the vote is passed, the `Patch` will be included in the `checked` branch, otherwise the error in it will be noted.
- If the score is high enough, the `Patch` will be included in the `official` branch.

**Notes: We use `cherry-pick` or `format-patch` to merge each commit, instead of `merge` or `rebase`, to avoid merging unqualified commits into. Therefore, we should submit as little and complete content as possible each time.**

```
git cherry-pick <commit-hash>
git format-path ...
```

0 comments on commit 44c3f43

Please sign in to comment.