Skip to main content

Publish your rules

stele publish keeps a copy of your stele.md in a separate git repository. It’s useful when you want one place to see the rules of all your projects.

You stay in control: stele opens a merge request there, and you review it. It never merges anything.

Set it up​

Name the repository in stele.json:

{ "publish": { "repo": "git@github.com:you/guidelines.git" } }

If several projects share that repository, give each one its own path:

{ "publish": { "repo": "git@github.com:you/guidelines.git", "path": "project-a/stele.md" } }

Publish​

Run stele compile and commit stele.md first, then run:

stele publish
pushed branch stele/publish/project-a/stele.md to https://github.com/nacer-noubir/stele-publish-test.git
merge request opened: https://github.com/nacer-noubir/stele-publish-test/pull/1

Run it again whenever stele.md changes. It updates the same branch and the same merge request.

Logging in​

stele never asks for a token. It uses a login you already have: your gh or glab login, git’s stored credentials, or GITHUB_TOKEN or GITLAB_TOKEN.

If none of them works, it gives you a link to open the request yourself.

What gets sent​

This is the only stele command that uses the network, and it only runs when you run it.

It sends your committed stele.md, its path, the project’s commit hash and id, and your git name and email to that repository. To github.com or gitlab.com, it also sends the login it found.

Good to know​

  • Merge requests open on github.com and gitlab.com. On any other host, stele pushes the branch and you open the request by hand.
  • It has only been tried for real on github.com so far. The GitLab side has only been tested against a fake server.
  • The repository needs at least one commit.