Skip to content

Commit a36928f

Browse files
committed
update docs
1 parent 0397f3b commit a36928f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/naked-commands.md

+37
Original file line numberDiff line numberDiff line change
@@ -1 +1,38 @@
11
# Naked Commands
2+
3+
"Naked commands" are commands that are not associated with an environment. They are convenient but can potentially be dangerous if a user hits `enter` before their command is fully typed out and they ship changes to production. Here are a few examples of naked commands:
4+
5+
- `.deploy`
6+
- `.noop`
7+
- `.lock`
8+
- `.unlock`
9+
- `.wcid`
10+
11+
These commands are "naked" because they do not have a listed environment. This means that they will default to what ever environment is configured _as the default_. In most cases, this is **production**.
12+
13+
Here are some examples of non-naked commands:
14+
15+
- `.deploy staging`
16+
- `.noop production`
17+
- `.deploy to production`
18+
- `.noop to staging`
19+
- `.lock staging`
20+
- `.unlock production`
21+
- `.wcid development`
22+
23+
If you want to **enforce** non-naked commands as the default for your project, you can!
24+
25+
## Disabling Naked Commands
26+
27+
By setting the following input option (`disable_naked_commands`), you can disable naked commands for your project. This means that users will have to specify an environment for their command to run.
28+
29+
```yaml
30+
- uses: github/[email protected]
31+
id: branch-deploy
32+
with:
33+
disable_naked_commands: "true" # <--- this option must be "true" to disable naked commands
34+
```
35+
36+
---
37+
38+
[reference](https://github.com/github/branch-deploy/issues/210)

0 commit comments

Comments
 (0)