generated from fallion/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
564 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Contributing | ||
|
||
Contributions are most welcome. Please check the [CONTRIBUTING](https://commitsar.tech/docs/contributing/get_started) section of documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: fallion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
id: filtering | ||
title: How commit filtering works | ||
--- | ||
|
||
import Mermaid from "@theme/Mermaid"; | ||
|
||
<Mermaid | ||
chart={` | ||
graph TD | ||
A(First commit on master) --> B(merge branch feat/docs into master) | ||
B-->C(Third commit on master) | ||
B-->|branch| D(first commit on branch) | ||
D-->E(second commit on branch) | ||
E-->F(merge master into branch) | ||
C-->F | ||
`} | ||
/> | ||
|
||
### Branch diff | ||
|
||
By default commitsar will run git log on the base branch and the branch which is going to get merged and gets a diff of the commit objects. | ||
This allows us to get commits only on the branch iregardless of what was merged from master. | ||
|
||
### Filtering by type | ||
|
||
In the above example when running commitsar on master or the branch the commit `merge branch feat/docs into master` and `merge master into branch` will get filtered out. | ||
This is to prevent commitsar checking the default merge commits which are not going to be conventional commit compliant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
id: get_started | ||
title: Get started | ||
--- | ||
|
||
## Requirements | ||
|
||
- [Go](https://golang.org/) (See pinned version in go.mod) | ||
- [git](https://git-scm.com/) (while git is not required to run commitsar it is needed to set up tests) | ||
|
||
This project also uses [magefiles](https://magefile.org/). To get up and running please run: `go install github.com/magefile/mage`. These allow us to set up templates and cross-platform commands. | ||
|
||
## Running tests | ||
|
||
Run `mage test`. This will git clone all git bundles and run tests in the entire repo. To run single tests use the VSCode functionality or provide full path to `go test`. | ||
|
||
## Git bundles | ||
|
||
In order to test commitsar against complicated real-life examples we use [git bundles](https://git-scm.com/docs/git-bundle). These can be `git cloned` like real repositories. They allow us to created real history and prevent edge cases that can happen when creating git history using shell (all commits have same timestamp for example). | ||
|
||
### Creating a new bundle | ||
|
||
- create a new folder testdata/ | ||
- cd into it | ||
- git initgitz | ||
- commit away | ||
- once ready run `git bundle create name_of_repo.bundle --all` | ||
- copy the bundle to testdata/ | ||
|
||
All files outside of .bundle files are ignore in the testdata folder so you don't have to worry about cleanup. | ||
|
||
## Commit style | ||
|
||
This project uses the [conventional commit style](https://www.conventionalcommits.org/en/v1.0.0/), it is also the default style commitsar uses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
id: pipelines | ||
title: Worker pipelines | ||
--- | ||
|
||
Commitsar uses pipelines in order to use as much CPU power as possible. These are based on number of CPU \* 2 (assuming 1 physical and 1 logical core available). In order to add a new pipeline | ||
you just need to build a pipeline that adheres to the types provided here: https://github.com/aevea/commitsar/blob/master/internal/dispatcher/pipeline.go and register it in the root_runner. | ||
Each pipeline returns either a success type or pushes errors into the error channel. | ||
|
||
At the end all of this is collected and the results are presented to the user. | ||
|
||
This will also be used to introduce an easy plugin system in the future. | ||
|
||
import Mermaid from "@theme/Mermaid"; | ||
|
||
<Mermaid | ||
chart={` | ||
graph TD | ||
A(Dispatcher)-->B(Commit pipeline) | ||
A-->C(PR title pipeline) | ||
`} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
id: source | ||
title: Building from source | ||
--- | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React, { useEffect } from "react"; | ||
import mermaid from "mermaid"; | ||
|
||
mermaid.initialize({ | ||
startOnLoad: true, | ||
}); | ||
|
||
const Mermaid = ({ chart }) => { | ||
useEffect(() => { | ||
mermaid.contentLoaded(); | ||
}, []); | ||
return <div className="mermaid">{chart}</div>; | ||
}; | ||
|
||
export default Mermaid; |
Oops, something went wrong.
e6f39a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: