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

docs: add flowchart for GSoC23 project in README.md #719

Closed
wants to merge 49 commits into from
Closed
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2fa7dc3
added readme file for flowchart of gsoc project
14Richa May 24, 2023
7cf8553
fix in heading
14Richa May 25, 2023
a625758
added new flowchart
14Richa May 30, 2023
07fce45
minor fixes flowchart
14Richa May 30, 2023
fcc949e
minor fix
14Richa May 30, 2023
f1ba782
minor fix
14Richa May 30, 2023
f7c3bd8
changed a flowchart of invite-maintainers.yaml
14Richa Jun 1, 2023
4a89d9f
added note label on locations of workflows
14Richa Jun 1, 2023
6f25dcc
minor fixes
14Richa Jun 1, 2023
ce6a1d1
added a note in first workflow
14Richa Jun 1, 2023
8adbd86
changed validation workflow
14Richa Jun 2, 2023
9a59585
fixed update-maintainers workflow
14Richa Jun 2, 2023
6de6139
minor fix
14Richa Jun 2, 2023
ebe0614
minor fix
14Richa Jun 2, 2023
d8eddd2
updated first graph
14Richa Jun 2, 2023
ffe2f0a
changed some flowchart
14Richa Jun 2, 2023
d5eb1fd
updated flowcharts
14Richa Jun 5, 2023
a8af234
added new charts which shows connection in workflow
14Richa Jun 6, 2023
40d6a53
Merge branch 'master' into 14Richa/gsoc-fow-chart
14Richa Jun 16, 2023
4519cf2
minor fix
14Richa Jun 16, 2023
1411587
minor fix
14Richa Jun 19, 2023
3103f7b
minor fix in name of file
14Richa Jun 20, 2023
2ea9df5
minor fixes
14Richa Jun 20, 2023
655df24
changed the interconnection of workflow's flowchart
14Richa Jun 20, 2023
4d5458d
added the point about validation passes when
14Richa Jun 20, 2023
f9d3250
chnaged the flowchart and merged two flowchart
14Richa Jun 20, 2023
c3cdb20
minor fix
14Richa Jun 20, 2023
be007d2
changed the connection flowchart
14Richa Jun 21, 2023
9ebf234
changed the update-maintainers flowchart
14Richa Jun 21, 2023
fb28c9c
updated the name of workflow
14Richa Jun 21, 2023
698b51c
changed update-emeritus flowchart
14Richa Jun 21, 2023
df02903
minor fix
14Richa Jun 21, 2023
978c6c5
changed diamond shape
14Richa Jun 21, 2023
19c375f
updated the flowchart
14Richa Jun 21, 2023
0a7c76f
updated the flowchart of codeowner file changes
14Richa Jun 21, 2023
d568602
updated the validate-maintainer.yaml workflow
14Richa Jun 22, 2023
1d73a6b
minor fixes
14Richa Jun 26, 2023
a20cb69
minor fix in last flowchart
14Richa Jun 27, 2023
a012c1d
added last section
14Richa Jul 4, 2023
896a550
update readme
14Richa Jul 5, 2023
d4d718b
Merge branch 'master' into 14Richa/gsoc-fow-chart
14Richa Jul 6, 2023
b85e177
removed end from the last diagram
14Richa Jul 6, 2023
976498d
changed workflow name
14Richa Jul 6, 2023
3e2164a
minor fix
14Richa Jul 6, 2023
a5ba6f2
removed one workflow
14Richa Jul 13, 2023
c921001
added a new para in starting
14Richa Jul 13, 2023
5fa65c7
minbir fix in invite maintainer flowchart
14Richa Jul 13, 2023
cf66c84
added readme file in doc dir
14Richa Jul 18, 2023
cd187e1
minor fix in flowchart
14Richa Jul 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
259 changes: 259 additions & 0 deletions docs/GSOC-23/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
### Automate Listing of Members of the Technical Steering Committee - GSoC 2023 Project

This project, titled "Automate listing of members of the Technical Steering Committee", is part of the Google Summer of Code (GSoC) 2023. The goal is to automate the process of managing and maintaining the Maintainers.yaml file, which contains the list of maintainers and TSC members of AsyncAPI. Through a series of workflows, we aim to automatically update the member's list based on changes in other files, invite new maintainers and TSC members, update the Emeritus.yaml file when someone is removed, and aggregate helpful information in the Maintainers.yaml file. These automation and improvements will make it easier to manage the maintainers and TSC members of AsyncAPI.


The first graph outlines the steps to automate the updating of Maintainers.yaml. This involves migrating to YAML, updating the website code to handle YAML format, automating the updation of Maintainers.yaml, creating a verification workflow to block pull requests if records are added/removed by humans, creating an update-maintainers workflow, and allowing humans to update social info and TSC member property.

```mermaid
graph TD;

subgraph Migrate TSC_MEMBERS.JSON to MAINTAINERS.yml
A[Convert TSC_MEMBERS.JSON to MAINTAINERS.yml]
end

subgraph Read File & Filter TSC Members
B1[Read new file name]
B2[Filter objects with TSC member flag]
B1 --> B2
end

subgraph Automate Maintainers.yaml update
C[Automate Maintainers.yaml update]
D[Verification workflow]
E[update-maintainers workflow]
F[Allow humans to update social info and TSC member property]
end

A --> B1
B2 --> C
C --> D
C --> E
C --> F
```

The second graph outlines the steps for onboarding new maintainers. This involves creating an invitation workflow, creating a TSC member change workflow, and creating a notification workflow to inform existing members about the new addition.

```mermaid
graph TD;
J[New Maintainer Onboarding] --> K[Create invitation workflow];
J --> L[Create TSC member change workflow];
K --> M[Create notification workflow];
L --> M;
```

The third graph outlines the steps for updating the Emeritus.yaml file. This involves creating a removal workflow to remove members from the organization/team, and creating a pull request review workflow to ensure that changes are reviewed by a human before merging.

```mermaid
graph LR;
N[Updates to Emeritus.yaml file] --> O[Create removal workflow];
O --> P[Remove from organization/team];
O --> Q[Create PR review workflow];
```

Overall, these subgraphs represent a comprehensive approach to maintaining and updating the YAML files related to maintainers and TSC members, ensuring that new maintainers are onboarded effectively, and keeping the Emeritus.yaml file up to date. This approach involves a range of workflows and automated processes to streamline these tasks.

### Workflows

### `verify-maintainers.yaml`

This workflow listens for changes to the Maintainers.yaml file and verifies the legitimacy of the changes. It discerns between changes made by a bot and those made by a human. If a human has made changes that involve critical attributes, which include modifying fields such as the GitHub username, repository keys, or removing an entire maintainer object, the workflow blocks the pull request and notifies the user with an appropriate message.

The workflow allows the pull request to continue if:

- The changes are made by the approved bot account.
- The changes made by a human do not involve the removal or modification of critical attributes.

> Note: This workflow should be located only in the community repository and should be made a required status check in the repository settings, so if it fails, PR cannot be merged.

```mermaid
graph TD;
A[Maintainers.yaml file changes detected] --> B{Changes made by bot or human?};

B --> |Bot| E[Continue with pull request];
B --> |Human| C{Do changes involve critical attributes?};

C --> |Yes| D[Block pull request with message];
C --> |No| E[Continue with pull request];

D --> F[End];
E --> F;

subgraph Critical Attributes
CA1[GitHub Username];
CA2[Maintainer's repositories list];
CA3[Addition or removal of any maintainer object];
end

```

### `update-maintainers.yaml`

This workflow listens for changes to the CODEOWNERS file and updates the Maintainers.yaml file accordingly. It also picks up the GitHub username, Twitter handle, and the name of the maintained repository from the API and notifies the affected users. If bot accounts are removed or added in CODEOWNERS file then it should ignore this workflow.

> Note: This workflow should be located in every repository. It should be configured with permissions to update the Maintainers.yaml file in the community repository.

```mermaid
graph TD;
A[Changes made to CODEOWNERS file?] --> |New maintainer added| B[Update Maintainers.yaml];
A --> |Maintainer removed| F[Check if maintainer has other repositories];
B --> C[Pick up GitHub username, Twitter handle, and repository name from API];
C --> D[Notify affected users];
D --> E[End];
F --> |Maintainer has other repositories| G[Remove the given repository from the list of repositories the maintainer maintains];
G --> H[Update Maintainers.yaml];
F --> |Maintainer has no other repositories| I[Remove maintainer from Maintainers.yaml];
H --> J[Notify affected users];
I --> J;
J --> E;


```

### `invite-maintainers.yaml`

This workflow is triggered when a new maintainer is added. It calls the GitHub API to invite the maintainer to the AsyncAPI organization and adds to an existing team for the maintainers. The workflow also adds the new maintainer to the Maintainers GitHub team.

> Note: This workflow should be located in the community repository.

```mermaid
graph TD;
A[Is a new maintainer added to the AsyncAPI community?] --> |Yes| B[Call GitHub API to invite maintainer to the organization];
B --> C[Add maintainer to the Maintainers GitHub team];
C --> F[End];
A --> |No| G[Is a maintainer removed from the AsyncAPI community?];
G --> |Yes| H[Call GitHub API to remove maintainer from the organization];
H --> I[Remove maintainer from the Maintainers GitHub team];
I --> F[End];
G --> |No| F[End];
```

### `tsc-and-maintainers-update.yaml`

This workflow manages changes to the TSC team and the Maintainers list of a project. The workflow is triggered when there is a change to either the "tsc_member" property or the "Maintainers.yaml" file.

If a maintainer is removed from the Maintainers list, the workflow removes that person from the organization and teams.

If there is a change to the "tsc_member" property, the workflow adds or removes the member from the TSC team based on the value of the property. If a member is added to the TSC team, the workflow notifies affected users.

If there are no changes made to the TSC team or the Maintainers list, the workflow ends.

```mermaid
graph TD;
A[Change to tsc_member property or Maintainers.yaml?] --> |Maintainer removed| B[Remove person from organization and teams];
A --> |No| D[End];

B --> E[End];

A --> |tsc_member value change| F{Add or remove member from TSC team?};
F --> |Add| G[Add member to TSC team];
G --> H[Update TSC team membership];
H --> I[Notify affected users];
I --> J[End];
F --> |Remove| K[Remove member from TSC team];
K --> H;
```

### `msg-to-new-member-pr-merged.yml`

This workflow is triggered when a new member is added to the TSC. It notifies the new member about ways to get notified when TSC members are called out and notifies other TSC members by mentioning the GitHub team.

> Note: This workflow should be located in the community repository.
> This one is already present.

```mermaid
graph TD;
A[PR modifies tsc_member to true?] --> |Yes| B[Notify new member about ways to get notified];
B --> C[Notify TSC members about new member];
C --> D[End];
A --> |No| D[End];
```

### `update-emeritus.yaml`

This workflow is triggered when a person is either removed from the Maintainers.yaml file or if their TSC member status is changed. It updates the Emeritus.yaml file with the information of ex-TSC members who left the project. Additionally, it should also be able to handle changes in TSC membership status.

> Note: This workflow should be located in the community repository.

```mermaid
graph TD;
A[Change in Maintainers.yaml?] --> |Removal or TSC flag changed| B[Check if TSC member];
B --> |Yes| C[Update Emeritus.yaml];
C --> D[End];
B --> |No| D[End];
A --> |No change| D[End];
```

#### Workflow Diagram: Interconnections between Workflows

The following charts showcases the interconnections between different workflows that collectively automate the process of maintaining and updating the Maintainers.yaml file.

#### CODEOWNER Add/Remove

This flowchart illustrates the streamlined process for managing changes to a CODEOWNERS file. When changes are detected, the flowchart outlines steps for adding or removing a maintainer. For additions, it retrieves the new maintainer's information, updates Maintainers.yaml, validates changes, sends an invitation to the new maintainer, and notifies TSC members. For removals, it retrieves the removed maintainer's information, updates Maintainers.yaml, moves the removed maintainer's information to Emeritus.yaml, removes them from the organization, and notifies TSC members.

```mermaid
graph TD;
A[CODEOWNERS file changes detected] --> B{Is it an addition, removal, or configuration update?};

B --> |Addition| C{Is maintainer already listed in Maintainers.yaml?};
B --> |Removal| R{Is Maintainer still owning some other repositories?};
B --> |Configuration Update| X[End];

C --> |Yes| C1[Add repo to existing maintainer];
C --> |No| C2[Retrieve new maintainer information and add to maintainers list];

C1 --> PR2[Create PR in Community Repo to Update Maintainer];
C2 --> PR3[Create PR in Community Repo with New Maintainer Info];

R --> |Yes| R1[Remove repository from list];
R --> |No| R2[Remove maintainer from list];

R1 --> PR4[Create PR in Community Repo for Removal from Repo];
R2 --> PR5[Create PR in Community Repo for Total Removal];
```

Below flowchart illustrates the process of verifying changes detected in the Maintainers.yaml file. It helps determine the type of changes, whether they are made by a bot or a human, and takes appropriate actions based on the nature of the changes.

Critical Attributes:
- GitHub Username
- Maintainer's repositories list
- Addition or removal of any maintainer object

The flowchart guides the verification process and actions to be taken, including merging pull requests, sending invitations, updating organization and repository settings, and notifying TSC members.

Please refer to the flowchart for a visual representation of the steps involved in verifying Maintainers.yaml changes.


```mermaid
graph TD;
A[Maintainers.yaml file changes detected] --> B{Is it by bot or human?};

B --> |Bot| D1{What kind of changes?};
B --> |Human| H1{What kind of changes?};

D1 --> |Maintainer Changes| C1{Is it an addition or removal?};
D1 --> |Maintainer's repositories list| S1[Merge PR];

C1 --> |Addition| G1[Merge PR];
C1 --> |Removal| E1{Maintainer being removed};

G1 --> Z1[Send invitation to new maintainer and notify TSC Members Add new maintainer to organization, repository, and team Post welcome comment to pull request];

E1 --> |Yes| F1[Human verification required before removal];

F1 --> |Human verification successful| L2[Merge PR, Remove maintainer from organization and teams, update Emeritus.yaml, and notify TSC Members];

H1 --> |isTscMember Change| TSC1{True or False};
H1 --> |Critical Changes| P[Close PR with clear message and no action];
H1 --> |Simple Change| N[Merge PR];

TSC1 --> |True| T1[Handle TSC member addition];
TSC1 --> |False| T2[Handle TSC member removal];

subgraph Critical Attributes
CA1[GitHub Username];
CA2[Maintainer's repositories list];
CA3[Addition or removal of any maintainer object];
end
```