sapling/website
Michael Bolin f6bef0c4c6 support signing Git commits using a GPG key
Summary:
This was requested for `sl pr` in
https://github.com/facebook/sapling/issues/218,
though this diff adds support for signing commits in general, in Sapling.
Here's how it works:

- `sl config --local gpg.key <KEY>` to specify your key
- Now `gitcommittext()` takes an optional `str` for the `gpgsigningkey` if `gpg.key` is set and `gpg.enabled` is `true` (which is the default).
- The text of the unsigned commit object is constructed and then signed using `gpg --status-fd=2 -bsau <KEY>` with the text passed via stdin.
- The resulting signature is embedded into the original text to sign it. Note that the original PGP key goes through some minor formatting (`\r` is removed; lines must start with a space to avoid a `\n\n` sequence) before it is embedded.

I documented things to the best of my knowledge in `eden/website/docs/git/signing.md`.

Follow-up items:

- Show signed status in smartlog?
- Update `sl ghstack` to honor signing configuration when running `git commit-tree`.
- Update `sl pr` to honor signing configuration when running `git commit-tree`.

Reviewed By: quark-zju

Differential Revision: D41778874

fbshipit-source-id: 5018a0d8bea1b5e9293c05954db65f35dd3c7aff
2022-12-12 14:26:34 -08:00
..
docs support signing Git commits using a GPG key 2022-12-12 14:26:34 -08:00
fb Re-sync with internal repository 2022-11-15 00:48:09 -08:00
scripts include the name of the release in the data dump (#242) 2022-11-21 16:35:53 -08:00
src syntax-highlighting for smartlogs (#267) 2022-12-01 14:43:14 -08:00
static update ISL screenshots for website to show sl instead of hg 2022-12-07 17:39:48 -08:00
.eslintrc.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
.gitignore Re-sync with internal repository 2022-11-15 00:48:09 -08:00
.prettierignore Re-sync with internal repository 2022-11-15 00:48:09 -08:00
.prettierrc increase column length so Prettier formats tables 2022-11-18 18:27:04 -08:00
.stylelintrc.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
babel.config.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
constants.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
docusaurus.config.js add link to discord community 2022-11-16 13:43:49 -08:00
elements.tsx Re-sync with internal repository 2022-11-15 00:48:09 -08:00
package.json automatic update for docusaurus-plugin-internaldocs-fb@1.2.1 2022-12-07 08:41:07 -08:00
README.md Re-sync with internal repository 2022-11-15 00:48:09 -08:00
sidebars.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
tsconfig.json Re-sync with internal repository 2022-11-15 00:48:09 -08:00
yarn.lock automatic update for docusaurus-plugin-internaldocs-fb@1.2.1 2022-12-07 08:41:07 -08:00

Website

This website is built using Docusaurus 2, a modern static website generator.

Installation

$ yarn

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.

Continuous Integration

Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.

$ yarn ci