mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 21:02:45 -07:00
ci: add pr title check to enforce a consistent git history (#290)
This commit is contained in:
committed by
GitHub
parent
91236e5533
commit
c75d83dc7c
@@ -1,16 +1,16 @@
|
||||
import type { JSX } from 'react'
|
||||
import { Box, Button, Text, Title, Flex } from '@mantine/core'
|
||||
import { Link } from 'tuono'
|
||||
import { IconArrowRight, IconArrowLeft } from '@tabler/icons-react'
|
||||
import { Link } from 'tuono'
|
||||
|
||||
interface NavigationButton {
|
||||
interface NavigationButtonData {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
|
||||
interface NavigationButtonsProps {
|
||||
prev?: NavigationButton
|
||||
next?: NavigationButton
|
||||
prev?: NavigationButtonData
|
||||
next?: NavigationButtonData
|
||||
}
|
||||
|
||||
export default function NavigationButtons({
|
||||
@@ -25,7 +25,7 @@ export default function NavigationButtons({
|
||||
)
|
||||
}
|
||||
|
||||
interface NavigationButtonProps extends NavigationButton {
|
||||
interface NavigationBtnProps extends NavigationButtonData {
|
||||
type: 'next' | 'prev'
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ const NavigationBtn = ({
|
||||
type,
|
||||
title,
|
||||
href,
|
||||
}: NavigationButtonProps): JSX.Element => {
|
||||
}: NavigationBtnProps): JSX.Element => {
|
||||
const heading = type === 'next' ? 'Next' : 'Previous'
|
||||
const textAlign = type === 'next' ? 'left' : 'right'
|
||||
const variant = type === 'next' ? 'filled' : 'outline'
|
||||
|
||||
@@ -260,6 +260,11 @@ export const sidebarElements: Array<SidebarElement> = [
|
||||
label: 'Local development',
|
||||
href: '/documentation/contributing/local-development',
|
||||
},
|
||||
{
|
||||
type: 'element',
|
||||
label: 'Pull requests',
|
||||
href: '/documentation/contributing/pull-requests',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -111,3 +111,16 @@ cargo build
|
||||
|
||||
> On the documentation remember that `tuono` `npm` package is installed from the registry and
|
||||
> it is not linked to the repository.
|
||||
|
||||
import NavigationButtons from '../../../components/navigation-buttons'
|
||||
|
||||
<NavigationButtons
|
||||
prev={{
|
||||
title: 'Guidelines',
|
||||
href: '/documentation/contributing',
|
||||
}}
|
||||
next={{
|
||||
title: 'Pull requests',
|
||||
href: '/documentation/contributing/pull-requests',
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
import MetaTags from '@/components/meta-tags'
|
||||
|
||||
<MetaTags
|
||||
title="Tuono - Opening a pull request"
|
||||
canonical="https://tuono.dev/documentation/contributing/pull-requests"
|
||||
description="Contribute to Tuono. Learn here how to open a pull request."
|
||||
/>
|
||||
|
||||
import Breadcrumbs, { Element } from '@/components/breadcrumbs'
|
||||
|
||||
<Breadcrumbs
|
||||
breadcrumbs={[
|
||||
{ label: '✨ Contributing', href: '/documentation/contributing' },
|
||||
{ label: 'Pull Requests' },
|
||||
]}
|
||||
/>
|
||||
|
||||
# Pull Requests
|
||||
|
||||
Once your changes are ready, you can create a PR!
|
||||
|
||||
If you are not familiar with GitHub pull requests,
|
||||
you can check the [official documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
|
||||
|
||||
---
|
||||
|
||||
- If you are fixing an issue, bear in mind to link the issue itself in the PR description.
|
||||
- If you are adding a new feature, describe the intended use case that the feature fulfills.
|
||||
|
||||
> Bug fixes and new features should include tests.
|
||||
|
||||
## Title
|
||||
|
||||
The PR title must match the following format:
|
||||
|
||||
```text
|
||||
<type>[optional scope]: <short description>
|
||||
```
|
||||
|
||||
You can find commit examples in the [recent commits on main branch](https://github.com/tuono-labs/tuono/commits/main/)
|
||||
|
||||
Here are some examples:
|
||||
|
||||
- feat: add support for react 19
|
||||
- ci: create install-node-dependencies action
|
||||
- feat(packages/tuono-router): use React.Context to pass data
|
||||
- test(packages/tuono): messageChannel - use vi.fn
|
||||
|
||||
> We do not care about the number, or style of commits in your branch history,
|
||||
> because we squash merge every PR into `main`.
|
||||
>
|
||||
> Feel free to commit in whatever style you feel comfortable with.
|
||||
|
||||
### type
|
||||
|
||||
Must be one of the following
|
||||
|
||||
{/* @warning Keep in sync with .github/workflows/pr-title-checker.yml */}
|
||||
|
||||
- `docs` - if you only change documentation, and not shipped code
|
||||
- `feat` - any new functionality additions
|
||||
- `fix` - any bug fixes that don't add new functionality
|
||||
- `refactor` - a code change that neither fixes a bug or adds a feature
|
||||
- `test` - if you only change tests, and not shipped code
|
||||
- `ci` - if you change something related to continuos integration
|
||||
- `chore` - anything else (e.g.: release)
|
||||
|
||||
### optional scope
|
||||
|
||||
A scope may be provided to a commit's type,
|
||||
to provide additional contextual information and is contained within parenthesis
|
||||
E.g.: `fix(crates/tuono): remove cargo warnings`
|
||||
|
||||
### short description
|
||||
|
||||
A succinct title for the PR.
|
||||
(The title max length is set to 100 characters)
|
||||
|
||||
import NavigationButtons from '../../../components/navigation-buttons'
|
||||
|
||||
<NavigationButtons
|
||||
prev={{
|
||||
title: 'Local development',
|
||||
href: '/documentation/contributing/local-development',
|
||||
}}
|
||||
/>
|
||||
Reference in New Issue
Block a user