Skip to content

Commit e9b8b0a

Browse files
authored
Merge branch 'main' into 3226-security-permission-matrix
2 parents 33d79ce + bc51183 commit e9b8b0a

172 files changed

Lines changed: 1624 additions & 1719 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
body: reviewMessage,
105105
event: 'REQUEST_CHANGES'
106106
})
107+
exit 1 # prevents further steps from running and fails workflow
107108
# When the most recent review was CHANGES_REQUESTED and the existing
108109
# PR no longer contains unallowed changes, dismiss the previous review
109110
- name: Dismiss pull request review

.github/workflows/workflow-lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Lint workflows
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
8-
pull_request:
9-
branches-ignore:
10-
- translations
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# branches-ignore:
10+
# - translations
1111

1212
jobs:
1313
lint:
9.52 KB
Loading
9.61 KB
Loading
2.98 KB
Loading

content/README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
2424
- [Escaping single quotes](#escaping-single-quotes)
2525
- [Autogenerated mini TOCs](#autogenerated-mini-tocs)
2626
- [Versioning](#versioning)
27+
- [Free-pro-team vs. GitHub.com versioning](#free-pro-team-vs.-github.com-versioning)
2728
- [Filenames](#filenames)
2829
- [Whitespace control](#whitespace-control)
2930
- [Links and image paths](#links-and-image-paths)
@@ -213,6 +214,12 @@ A content file can have **two** types of versioning:
213214
* Liquid statements in content (**optional**)
214215
* Conditionally render content depending on the current version being viewed. See [contributing/liquid-helpers](../contributing/liquid-helpers.md) for more info. Note Liquid conditionals can also appear in `data` and `include` files.
215216

217+
### Free-pro-team vs. GitHub.com versioning
218+
219+
As of early 2021, the `free-pro-team@latest` version is **only** supported in content files (in both frontmatter and Liquid versioning) and throughout the docs site backend. It is **not** user facing. A helper function called `lib/remove-fpt-from-path.js` removes the version from URLs. Users now select `GitHub.com` in the Article Versions dropdown instead of `Free, Pro, Team`.
220+
221+
The convenience function allows us to continue supporting a consistent versioning structure under-the-hood while not displaying plan information to users that may be potentially confusing.
222+
216223
## Filenames
217224

218225
When adding a new article, make sure the filename is a [kebab-cased](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles) version of the title you use in the article's [`title`](#title) frontmatter. This can get tricky when a title has punctuation (such as "GitHub's Billing Plans"). A test will flag any discrepancies between title and filename. To override this requirement for a given article, you can add [`allowTitleToDifferFromFilename`](#allowtitletodifferfromfilename) frontmatter.
@@ -224,7 +231,7 @@ When using Liquid conditionals in lists or tables, you can use [whitespace contr
224231
Just add a hyphen on either the left, right, or both sides to indicate that there should be no newline on that side. For example, this statement removes a newline on the left side:
225232

226233
```
227-
{%- if page.version == 'dotcom' %}
234+
{%- if currentVersion == 'free-pro-team@latest' %}
228235
```
229236

230237
These characters are especially important in [index pages](#index-pages) comprised of list items.
@@ -238,9 +245,9 @@ For example, if you include the following link in a content file:
238245
```
239246
/github/writing-on-github/creating-a-saved-reply
240247
```
241-
When viewed on GitHub.com docs, the link gets rendered with the language code and version:
248+
When viewed on GitHub.com docs, the link gets rendered with the language code:
242249
```
243-
/en/free-pro-team@latest/github/writing-on-github/creating-a-saved-reply
250+
/en/github/writing-on-github/creating-a-saved-reply
244251
```
245252
and when viewed on GitHub Enterprise Server docs, the version is included as well:
246253
```
@@ -262,7 +269,7 @@ https://github-images.s3.amazonaws.com/enterprise/2.20/assets/images/help/profil
262269

263270
Sometimes you want to link to a Dotcom-only article in Enterprise content and you don't want the link to be Enterprise-ified. To prevent the transformation, write the link using HTML and add a class of `dotcom-only`. For example:
264271

265-
```
272+
```html
266273
<a href="/github/site-policy/github-terms-of-service" class="dotcom-only">GitHub's Terms of Service</a>
267274
```
268275

content/actions/creating-actions/dockerfile-support-for-github-actions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,21 @@ The Docker `ENTRYPOINT` instruction has a _shell_ form and _exec_ form. The Dock
4848

4949
If you configure your container to use the _exec_ form of the `ENTRYPOINT` instruction, the `args` configured in the action's metadata file won't run in a command shell. If the action's `args` contain an environment variable, the variable will not be substituted. For example, using the following _exec_ format will not print the value stored in `$GITHUB_SHA`, but will instead print `"$GITHUB_SHA"`.
5050

51-
```
51+
```dockerfile
5252
ENTRYPOINT ["echo $GITHUB_SHA"]
5353
```
5454

5555
If you want variable substitution, then either use the _shell_ form or execute a shell directly. For example, using the following _exec_ format, you can execute a shell to print the value stored in the `GITHUB_SHA` environment variable.
5656

57-
```
57+
```dockerfile
5858
ENTRYPOINT ["sh", "-c", "echo $GITHUB_SHA"]
59-
````
59+
```
6060

6161
To supply `args` defined in the action's metadata file to a Docker container that uses the _exec_ form in the `ENTRYPOINT`, we recommend creating a shell script called `entrypoint.sh` that you call from the `ENTRYPOINT` instruction:
6262

6363
##### Example *Dockerfile*
64-
```
64+
65+
```dockerfile
6566
# Container image that runs your code
6667
FROM debian:9.5-slim
6768

content/actions/creating-actions/setting-exit-codes-for-actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ For more information, see "[Creating a JavaScript action](/articles/creating-a-j
4141

4242
If you are creating a Docker container action, you can set a failure exit code in your `entrypoint.sh` script. For example:
4343

44+
{% raw %}
4445
```
4546
if <condition> ; then
4647
echo "Game over!"
4748
exit 1
4849
fi
4950
```
51+
{% endraw %}
5052

5153
For more information, see "[Creating a Docker container action](/articles/creating-a-docker-container-action)."

content/actions/guides/building-and-testing-nodejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ steps:
220220

221221
The example above creates an *.npmrc* file with the following contents:
222222

223-
```
223+
```ini
224224
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
225225
@octocat:registry=https://registry.npmjs.org/
226226
always-auth=true

content/actions/guides/caching-dependencies-to-speed-up-workflows.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ A cache key can include any of the contexts, functions, literals, and operators
124124
Using expressions to create a `key` allows you to automatically create a new cache when dependencies have changed. For example, you can create a `key` using an expression that calculates the hash of an npm `package-lock.json` file.
125125

126126
{% raw %}
127-
```
127+
```yaml
128128
npm-${{ hashFiles('package-lock.json') }}
129129
```
130130
{% endraw %}
131131

132132
{% data variables.product.prodname_dotcom %} evaluates the expression `hash "package-lock.json"` to derive the final `key`.
133133

134-
```
134+
```yaml
135135
npm-d5ea0750
136136
```
137137

@@ -144,7 +144,7 @@ You can provide a list of restore keys to use when there is a cache miss on `key
144144
#### Example using multiple restore keys
145145

146146
{% raw %}
147-
```
147+
```yaml
148148
restore-keys: |
149149
npm-foobar-${{ hashFiles('package-lock.json') }}
150150
npm-foobar-
@@ -155,7 +155,7 @@ restore-keys: |
155155
The runner evaluates the expressions, which resolve to these `restore-keys`:
156156

157157
{% raw %}
158-
```
158+
```yaml
159159
restore-keys: |
160160
npm-foobar-d5ea0750
161161
npm-foobar-

0 commit comments

Comments
 (0)