chore: dco improvements

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2023-11-11 20:40:47 -06:00
parent 3714f6299b
commit 4a1dfae9d5
+17
View File
@@ -288,6 +288,13 @@ Awesome commit message
Signed-off-by: Jane Smith <jane.smith@example.com>
```
> Note: this assumes you have setup your git name and email, if you haven you can use these commands to set that up:
>
> ```shell
> git config --global user.name "Your Name"
> git config --global user.email "youremail@example.com"
> ```
- In case you forgot to add it to the most recent commit, use `git commit --amend --signoff`
- In case you forgot to add it to the last N commits in your branch, use `git rebase --signoff HEAD~N` and replace N with the number of new commits you created in your branch.
- If you have a very deep branch with a lot of commits, run `git rebase -i --signoff $(git merge-base -a master HEAD)`, double check to make sense of the commits (keep all lines as `pick`) and save and close the editor. This should bulk sign all the commits in your PR. Do be careful though. If you have a complex flow with a lot of branching and re-merging of work branches and stuff, merge-base may not be the right solution for you.
@@ -306,6 +313,16 @@ Signed-off-by: Jane Smith <jane.smith@example.com>
In case you forgot to add the line to your most recent commit, you can amend the commit message from the History tab before pushing your branch (GitHub Desktop 2.9 or later).
### Using VS Code?
If you are using VS Code you can enable always signing your commits by setting the following in your `settings.json`:
```json
"git.alwaysSignOff": true,
```
Or from the Settings UI look for the "Git: Always Sign Off" setting and check the "Controls the signoff flag for all commits" box
## API Reports
Backstage uses [API Extractor](https://api-extractor.com/) and TSDoc comments to generate API Reports in Markdown format. These reports are what drive the [API Reference documentation](https://backstage.io/docs/reference/). What this means is that if you are making changes to the API or adding a new plugin then you will need either generate a new API Report or update an existing API Report. If you don't do this the CI build will fail when you create your Pull Request.