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: add pull request template guide #13

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style=space
indent_size=2

[*.md]
max_line_length = 100
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Description

> Please provide a brief summary of the changes made. Include the specific guideline that is being
> addressed or added, and explain its significance.

> Please explain why this change was necessary. Was there a lack of clarity? Was the information
> outdated? Or is this a new addition to the guidelines?

## Changes Made

> Please detail the modifications made. This could include areas such as changes in content,
> structure, or formatting.

## Checklist:

- [ ] I have followed the style guidelines of this project.
- [ ] I have performed a self-review of my own changes.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have reviewed the [CONTRIBUTING.md](../docs/CONTRIBUTING.md) guidelines.
1 change: 1 addition & 0 deletions public/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* [Crafting a Readme](/guides/README_GUIDE.md)
* [Understanding Licenses](/guides/LICENSE_GUIDE.md)
* [Contributor's Handbook](/guides/CONTRIBUTING_GUIDE.md)
* [Pull Request Manual](/guides/PULL_REQUEST_GUIDE.md)
* [Code of Conduct Guidelines](/guides/CODE_OF_CONDUCT_GUIDE.md)
6 changes: 6 additions & 0 deletions public/guides/CONTRIBUTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Add a file called `CONTRIBUTING.md` to the root of your repository, the `docs` f
the `.github` folder, with the text you wrote. GitHub automatically adds a link to this file in the
_About_ section of your repository homepage.

## Next steps

Now that you've added a Contributing Guide to your project, you can help contributors further with
a pull request template. Follow-up with our [Pull Request Manual][pr-guide].

[github-documentation]: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors
[pillarbox-contributing]: https://github.com/SRGSSR/pillarbox-apple/blob/main/docs/CONTRIBUTING.md
[contributing-template]: https://github.com/nayafia/contributing-template
[pr-guide]: ./PULL_REQUEST_GUIDE
82 changes: 82 additions & 0 deletions public/guides/PULL_REQUEST_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Pull Request Manual

Pull Requests are an integral aspect of a collaborative project. Through this process, contributors
can propose modifications, enhancements, or new features to a codebase. **The true strength of a
pull request lies in the subsequent peer review.**

## Why Code Reviewing Matters

- **Code Quality and Consistency:** Code reviewing ensures that the code adheres to established
standards, follows best practices, and maintains a high level of quality.
- **Knowledge Sharing:** With code reviews, contributors can learn from each other's problem-solving
approaches, coding styles, promoting a culture of continuous learning within the team.
- **Bug Prevention:** A fresh set of eyes often catches issues that the original author might have
overlooked.

## The Pull Request Template

The pull request template is a valuable tool for creating a successful pull request. It is a guide
to help contributors understand what is expected of them.

Here are some reasons why adding a pull request template to your repository is important:

- **Clarity and Consistency**: A pull request template ensures that every contributor provides the
necessary information when proposing changes.
- **Efficiency**: With a template, reviewers don't have to ask basic questions about the pull
request, as most of the essential details should be included in the template.
- **Documentation**: Detailed pull requests serve as a form of documentation, providing insight into
the project's history and the rationale behind certain decisions.
- **Quality Control**: A checklist in the template can serve as a reminder for contributors to
adhere to the project's standards and guidelines, leading to higher quality submissions.

### Adding a Pull Request Template

You can store your pull request template here: `.github/pull_request_template.md`. You can review
other options on the following GitHub documentation:

[Creating a pull request template for your repository][github-creating-pr-template].
SamuelBeaurepaire marked this conversation as resolved.
Show resolved Hide resolved

### Example

Here's an example of a pull request template; feel free to use it in your project and modify it to
your needs:

```markdown
## Description

> Please provide a brief summary of the changes made. Please explain why
> this change was necessary. Was there a problem or an issue this change
> will address? What will be improved with this change?

## Changes Made

> Please detail the modifications made. This could include areas such as
> code, documentation, structure, or formatting.

## Checklist

- [ ] I have followed the project's style guidelines.
- [ ] I have performed a self-review of my own changes.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes do not generate new warnings.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have reviewed the contribution guidelines.
```

#### Creating a Checklist

You can add a **Checklist** section to further guide contributors. In this section, add items that
reflect the "Definition of Done" for your project or any specific guidelines mentioned in the
"Contributing" section of the README. This could include items like:

- My code follows the code style of this project.
- I have added tests to cover my changes.
- All new and existing tests passed.
- My changes generate no new warnings.
- I have updated the documentation accordingly.

> [!Note]
> Remember, the goal of the pull request template is to make collaboration easier by setting clear
> expectations for contributions. Tailor it to suit the specific needs of your project.

[github-creating-pr-template]: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
44 changes: 22 additions & 22 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RTS Development Guidelines</title>
<link rel="shortcut icon" type="image/x-icon" href="https://www.rts.ch/hbv7/static/images/favicon/rts/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
<style>
.sidebar-nav > p {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
<meta charset="UTF-8">
<title>RTS Development Guidelines</title>
<link rel="shortcut icon" type="image/x-icon" href="//www.rts.ch/hbv7/static/images/favicon/rts/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
<style>
.sidebar-nav > p {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
repo: 'https://github.com/SRGSSR/guilde-plateformes-propres',
auto2top: true,
relativePath: true,
loadSidebar: true,
themeColor: '#00af91',
subMaxLevel: 2
}
window.$docsify = {
repo: 'https://github.com/SRGSSR/guilde-plateformes-propres',
auto2top: true,
relativePath: true,
loadSidebar: true,
themeColor: '#00af91',
subMaxLevel: 2
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
Expand Down