Skip to content

Commit

Permalink
docs(sage-monorepo): fix the format of the co-author docs page (#2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Feb 23, 2024
1 parent f6dc872 commit 79b769c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 23 deletions.
68 changes: 48 additions & 20 deletions docs/developers-guide/creating-a-commit-with-multiple-authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ to the commit's message. Co-authored commits are visible on GitHub.

## When to add co-authors to a commit?

Annotating commits with co-authors is required when:
Annotating commits with `Co-authored-by` is generally encouraged when copying code from other
developers.

- You are about to commit previously-untracked code written by other users.
- Example:
1. User A develops a new feature and submits it as a PR.
2. User B is tasked with refactoring the PR from User A into multiple PRs.
3. User B copy-paste code written by User A and adapt it.
4. User B adds User A as a co-author when the commits include code written by User A.
Annotating commits with `Co-authored-by` is **required** when you are committing
previously-untracked code written by other users.

!!! example "Example"

1. Bea develops a new feature and submits it as a pull request (PR).
2. Eddy is tasked with refactoring Bea's PR into multiple PRs.
3. Eddy copies and pastes code written by Bea and adapts it.
4. Eddy adds Bea as a co-author to the commits that include code she wrote.

## Adding co-authors to a commit

Expand All @@ -34,19 +38,43 @@ Co-authored-by: ANOTHER-NAME <ANOTHER-EMAIL>"

The name and "no-reply" emails of the Sage Monorepo contributors (sorted alphabetically):

- Co-authored-by: andrewelamb <[email protected]>
- Co-authored-by: gaiaandreoletti <[email protected]>
- Co-authored-by: Lingling <[email protected]>
- Co-authored-by: mdsage1 <[email protected]>
- Co-authored-by: Rongrong Chai <[email protected]>
- Co-authored-by: sagely1 <[email protected]>
- Co-authored-by: Thomas Schaffter <[email protected]>
- Co-authored-by: Verena Chung <[email protected]>

> [!NOTE]
> The names and user ID are collected from the profile page of the contributors. If a contributor
does not specify their name on the profile page, the listing below uses their GitHub username
instead of their name. The user ID can be found in the URL of the user's avatar.
```
Co-authored-by: andrewelamb <[email protected]>
```

```
Co-authored-by: gaiaandreoletti <[email protected]>
```

```
Co-authored-by: Lingling <[email protected]>
```

```
Co-authored-by: mdsage1 <[email protected]>
```

```
Co-authored-by: Rongrong Chai <[email protected]>
```

```
Co-authored-by: sagely1 <[email protected]>
```

```
Co-authored-by: Thomas Schaffter <[email protected]>
```

```
Co-authored-by: Verena Chung <[email protected]>
```

!!! note

The names, usernames and user IDs of the contributors are collected from their GitHub profile
pages. If a contributor does not specify their name on the profile page, the listing uses their
username instead of their name. The user ID can be found in the URL of the user's avatar.

## References

Expand Down
5 changes: 2 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,17 @@ theme:
info: octicons/info-16
features:
- content.code.copy
- navigation.tabs
- navigation.footer
- navigation.sections
- navigation.tabs
- search.highlight
- search.share
- search.suggest
- toc.follow

plugins:
- search
- mkdocstrings
- autorefs
- search
- termynal

markdown_extensions:
Expand Down

0 comments on commit 79b769c

Please sign in to comment.