Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .controlplane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ self-review, and consider disabling administrator bypass. Do not store
promotion wrapper does not use `secrets: inherit`; GitHub exposes the production
token only after the environment approval gate passes.

If promotion fails with
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
the token is missing from the environment scope. A repository or organization
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
Comment on lines +95 to +98

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permission note was inserted between the colon-ending sentence and its code block, breaking the prose flow. A sentence ending with : implies the code block immediately follows — a reader following the colon lands on a second sentence instead.

Consider either folding the caveat into the lead-in line or placing it after the block:

Suggested change
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
secret with the same name is not enough for this workflow. Create or verify the
environment secret with the `gh` CLI (requires permission to manage repository environments and secrets):


```sh
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh secret set without --body or piped input will prompt interactively for the secret value, which is the right behaviour — but worth noting for readers who aren't familiar with the CLI, otherwise the command looks incomplete. A short comment like # (prompts for the token value) or a preceding sentence would help.

Suggested change
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production # prompts for the token value
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production

gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
```

The matching Control Plane resources are:

| Resource | Name |
Expand Down
13 changes: 13 additions & 0 deletions .controlplane/shakacode-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ passes `production_environment: production`; the upstream reusable workflow runs
its production job in that environment, and GitHub injects the production token
only after approval.

If promotion fails with
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
the token is missing from the environment scope. A repository or organization
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
Comment on lines +65 to +68

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same prose-flow issue as in readme.md — the permission note lands between the colon and its code block.

Suggested change
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
secret with the same name is not enough for this workflow. Create or verify the
environment secret with the `gh` CLI (requires permission to manage repository environments and secrets):


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other two files (.controlplane/readme.md and .github/cpflow-help.md) include the sentence:

A repository or organization secret with the same name is not enough for this workflow.

This is the key clarification that prevents confusion. It's missing here, leaving team members without the explicit warning.

Suggested change
the token is missing from the environment scope. A repository or organization
secret with the same name is not enough for this workflow. Configure it with:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f76c3a1 by adding the missing repository/organization-secret warning to .controlplane/shakacode-team.md.

```sh
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
```

Generated caller workflows pass only the named secrets each upstream workflow
needs. They do not use `secrets: inherit`; `CPLN_TOKEN_PRODUCTION` is supplied
only by the protected `production` Environment after approval.
Expand Down
13 changes: 13 additions & 0 deletions .github/cpflow-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ prevent self-review. The generated promotion wrapper passes only the staging
token from repository secrets; GitHub injects `CPLN_TOKEN_PRODUCTION` only after
the environment approval gate passes.

If promotion fails with
`CPLN_TOKEN_PRODUCTION is not set. Add it as a secret on the 'production' GitHub Environment.`,
the token is missing from the environment scope. A repository or organization
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
Comment on lines +76 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same prose-flow issue — permission note interrupts the colon→code-block expectation.

Suggested change
secret with the same name is not enough for this workflow. Create or verify the
environment secret with:
You need permission to manage repository environments and secrets to run these
commands.
secret with the same name is not enough for this workflow. Create or verify the
environment secret with the `gh` CLI (requires permission to manage repository environments and secrets):


```sh
gh secret set CPLN_TOKEN_PRODUCTION --repo shakacode/react-webpack-rails-tutorial --env production
gh secret list --repo shakacode/react-webpack-rails-tutorial --env production
```

Before the first promotion, bootstrap the production app the same way in the
production org, using production-only secrets and values.

Expand Down
Loading