Skip to content

Commit c6cb579

Browse files
committed
Merge branch 'main' of github.com:github/docs-internal into exclude-some-links
2 parents 9207af8 + c68eea9 commit c6cb579

117 files changed

Lines changed: 738 additions & 607 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/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = [
1212
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/setup-ruby@v1.1.2
1313
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
1414
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
15-
'crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120',
15+
'crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c',
1616
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
1717
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1818
'docker://chinthakagodawita/autoupdate-action:v1',
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Check for Spammy Issues
2+
on:
3+
issues:
4+
types: [opened]
5+
jobs:
6+
spammy-title-check:
7+
name: Remove issues with spammy titles
8+
if: github.repository == 'github/docs'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
12+
with:
13+
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
14+
script: |
15+
16+
const issue = context.payload.issue
17+
const owner = 'github'
18+
const repo = 'docs'
19+
20+
const titleWordCount = issue.title.trim().split(' ').length
21+
const titleWordCountMin = 2
22+
23+
try {
24+
await github.teams.getMembershipForUserInOrg({
25+
org: 'github',
26+
team_slug: 'employees',
27+
username: context.payload.sender.login,
28+
});
29+
30+
// Do not perform this workflow with GitHub employees. This return
31+
// statement only gets hit if the user is a GitHub employee
32+
return
33+
} catch(err) {
34+
// An error will be thrown if the user is not a GitHub employee
35+
// If a user is not a GitHub employee, we should check to see if title has at least the minimum required number of words in it and if it does, we can exit the workflow
36+
37+
if(titleWordCount > titleWordCountMin) {
38+
return
39+
}
40+
}
41+
42+
//
43+
// Assuming the user is not a GitHub employee and the issue title
44+
// has the minimum number of words required, proceed.
45+
//
46+
47+
// Close the issue and add the invalid label
48+
await github.issues.update({
49+
owner: owner,
50+
repo: repo,
51+
issue_number: issue.number,
52+
labels: ['invalid'],
53+
state: 'closed'
54+
});
55+
56+
// Comment on the issue
57+
await github.issues.createComment({
58+
owner: owner,
59+
repo: repo,
60+
issue_number: issue.number,
61+
body: "This issue appears to have been opened accidentally. I'm going to close it now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!"
62+
});

.github/workflows/site-policy-sync.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ jobs:
2929

3030
# Pushes to other repo
3131
- name: Push folder to another repository
32-
uses: crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120
32+
uses: crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c
3333
env:
3434
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_SITEPOLICY }}
3535
with:
3636
source_folder: 'content/github/site-policy'
3737
destination_repo: 'github/site-policy'
38-
destination_branch: 'repo-sync'
38+
destination_branch: 'main'
39+
destination_branch_create: 'repo-sync'
3940
destination_folder: 'Policies'
4041
user_email: 'pcihon@users.noreply.github.com'
4142
user_name: 'pcihon'
25.1 KB
Loading
-2.16 KB
Loading

content/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
2121
- [`miniTocMaxHeadingLevel`](#minitocmaxheadinglevel)
2222
- [`allowTitleToDifferFromFilename`](#allowtitletodifferfromfilename)
2323
- [`defaultPlatform`](#defaultplatform)
24+
- [`learningTracks`](#learningTracks)
25+
- [`includeGuides`](#includeGuides)
26+
- [`type`](#type)
27+
- [`topics`](#topics)
2428
- [Escaping single quotes](#escaping-single-quotes)
2529
- [Autogenerated mini TOCs](#autogenerated-mini-tocs)
2630
- [Versioning](#versioning)
@@ -29,6 +33,7 @@ See the [contributing docs](/CONTRIBUTING.md) for general information about work
2933
- [Whitespace control](#whitespace-control)
3034
- [Links and image paths](#links-and-image-paths)
3135
- [Preventing transformations](#preventing-transformations)
36+
- [Creating new sublanding pages](#creating-new-sublanding-pages)
3237

3338
## Frontmatter
3439

@@ -186,6 +191,39 @@ Example:
186191
defaultPlatform: linux
187192
```
188193

194+
### `learningTracks`
195+
- Purpose: Render a list of learning tracks on a product's sub-landing page.
196+
- type: `String`. This should reference learning tracks' names defined in [`data/learning-tracks/*.yml`](../data/learning-tracks/README.md).
197+
- Optional
198+
199+
**Note: the first learning track is by-default the featured track.*
200+
201+
### `includeGuides`
202+
- Purpose: Render a list of articles, filterable by `type` and `topics`. Only applicable when used with `layout: product-sublanding`.
203+
- Type: `Array`
204+
- Optional.
205+
206+
Example:
207+
208+
```yml
209+
includeGuides:
210+
- /actions/guides/about-continuous-integration
211+
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
212+
- /actions/guides/building-and-testing-nodejs
213+
- /actions/guides/building-and-testing-powershell
214+
```
215+
216+
### `type`
217+
- Purpose: Indicate the type of article.
218+
- Type: `String`, one of the `overview`, `quick_start`, `tutorial`, `how_to`, `reference`.
219+
- Optional.
220+
221+
### `topics`
222+
- Purpose: Indicate the topics covered by the article.
223+
- Type: `String`
224+
- Optional.
225+
226+
189227
### Escaping single quotes
190228

191229
If you see two single quotes in a row (`''`) in YML frontmatter where you might expect to see one (`'`), this is the YML-preferred way to escape a single quote. From [the YAML spec](https://yaml.org/spec/history/2001-12-10.html):
@@ -274,3 +312,15 @@ Sometimes you want to link to a Dotcom-only article in Enterprise content and yo
274312
```
275313

276314
Sometimes the canonical home of content moves outside the docs site. None of the links included in [`lib/redirects/external-sites.json`](/lib/redirects/external-sites.json) get rewritten. See [`contributing/redirects.md`](/contributing/redirects.md) for more info about this type of redirect.
315+
316+
317+
### Creating new sublanding pages
318+
319+
To create a sublanding page (e.g. [Actions' Guide page](https://docs.github.com/en/actions/guides)), create or modify an existing markdown file with these specific frontmatter values:
320+
321+
1. Use the sublanding page template by referencing it `layout: product-sublanding`
322+
2. (optional) Include the learning tracks in [`learningTracks`](#learningTracks)
323+
3. (optional) Define which articles to include with [`includeGuides`](#includeGuides).
324+
325+
If using learning tracks, they need to be defined in [`data/learning-tracks/*.yml`](../data/learning-tracks/README.md).
326+
If using `includeGuides`, make sure each of the articles in this list has [`topics`](#topics) and [`type`](#type) in its frontmatter.

content/actions/guides/building-and-testing-java-with-gradle.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ steps:
113113
${{ runner.os }}-gradle-
114114
- name: Build with Gradle
115115
run: ./gradlew build
116+
- name: Cleanup Gradle Cache
117+
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
118+
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
119+
run: |
120+
rm -f ~/.gradle/caches/modules-2/modules-2.lock
121+
rm -f ~/.gradle/caches/modules-2/gc.properties
116122
```
117123
{% endraw %}
118124

content/developers/apps/creating-ci-tests-with-the-checks-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ The code above gets the full repository name and the head SHA of the commit from
435435

436436
### Step 2.3. Running RuboCop
437437

438-
Great! You're cloning the repository and creating check runs using your CI server. Now you'll get into the nitty gritty details of the [RuboCop linter](https://rubocop.readthedocs.io/en/latest/basic_usage/#rubocop-as-a-code-style-checker) and [Checks API annotations](/rest/reference/checks#create-a-check-run).
438+
Great! You're cloning the repository and creating check runs using your CI server. Now you'll get into the nitty gritty details of the [RuboCop linter](https://docs.rubocop.org/rubocop/usage/basic_usage.html#code-style-checker) and [Checks API annotations](/rest/reference/checks#create-a-check-run).
439439

440440
The following code runs RuboCop and saves the style code errors in JSON format. Add this code below the call to `clone_repository` you added in the [previous step](#step-22-cloning-the-repository) and above the code that updates the check run to complete.
441441

@@ -447,7 +447,7 @@ logger.debug @report
447447
@output = JSON.parse @report
448448
```
449449

450-
The code above runs RuboCop on all files in the repository's directory. The option `--format json` is a handy way to save a copy of the linting results in a machine-parsable format. See the [RuboCop docs](https://rubocop.readthedocs.io/en/latest/formatters/#json-formatter) for details and an example of the JSON format.
450+
The code above runs RuboCop on all files in the repository's directory. The option `--format json` is a handy way to save a copy of the linting results in a machine-parsable format. See the [RuboCop docs](https://docs.rubocop.org/rubocop/formatters.html#json-formatter) for details and an example of the JSON format.
451451

452452
Because this code stores the RuboCop results in a `@report` variable, it can safely remove the checkout of the repository. This code also parses the JSON so you can easily access the keys and values in your GitHub App using the `@output` variable.
453453

@@ -588,7 +588,7 @@ This code limits the total number of annotations to 50. But you can modify this
588588

589589
When the `offense_count` is zero, the CI test is a `success`. If there are errors, this code sets the conclusion to `neutral` in order to prevent strictly enforcing errors from code linters. But you can change the conclusion to `failure` if you would like to ensure that the check suite fails when there are linting errors.
590590

591-
When errors are reported, the code above iterates through the `files` array in the RuboCop report. For each file, it extracts the file path and sets the annotation level to `notice`. You could go even further and set specific warning levels for each type of [RuboCop Cop](https://rubocop.readthedocs.io/en/latest/cops/), but to keep things simpler in this quickstart, all errors are set to a level of `notice`.
591+
When errors are reported, the code above iterates through the `files` array in the RuboCop report. For each file, it extracts the file path and sets the annotation level to `notice`. You could go even further and set specific warning levels for each type of [RuboCop Cop](https://docs.rubocop.org/rubocop/cops.html), but to keep things simpler in this quickstart, all errors are set to a level of `notice`.
592592

593593
This code also iterates through each error in the `offenses` array and collects the location of the offense and error message. After extracting the information needed, the code creates an annotation for each error and stores it in the `annotations` array. Because annotations only support start and end columns on the same line, `start_column` and `end_column` are only added to the `annotation` object if the start and end line values are the same.
594594

@@ -718,7 +718,7 @@ If the annotations are related to a file already included in the PR, the annotat
718718

719719
If you've made it this far, kudos! 👏 You've already created a CI test. In this section, you'll add one more feature that uses RuboCop to automatically fix the errors it finds. You already added the "Fix this" button in the [previous section](#step-25-updating-the-check-run-with-ci-test-results). Now you'll add the code to handle the `requested_action` check run event triggered when someone clicks the "Fix this" button.
720720

721-
The RuboCop tool [offers](https://rubocop.readthedocs.io/en/latest/basic_usage/#auto-correcting-offenses) the `--auto-correct` command-line option to automatically fix errors it finds. When you use the `--auto-correct` feature, the updates are applied to the local files on the server. You'll need to push the changes to GitHub after RuboCop does its magic.
721+
The RuboCop tool [offers](https://docs.rubocop.org/rubocop/usage/basic_usage.html#auto-correcting-offenses) the `--auto-correct` command-line option to automatically fix errors it finds. When you use the `--auto-correct` feature, the updates are applied to the local files on the server. You'll need to push the changes to GitHub after RuboCop does its magic.
722722

723723
To push to a repository, your app must have write permissions for "Repository contents." You set that permission back in [Step 2.2. Cloning the repository](#step-22-cloning-the-repository) to **Read & write**, so you're all set.
724724

content/developers/github-marketplace/about-github-marketplace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To learn about publishing {% data variables.product.prodname_actions %} in {% da
2020

2121
Anyone can share their apps with other users for free on {% data variables.product.prodname_marketplace %} but only apps owned by organizations can sell their app.
2222

23-
To publish paid plans for your app and display the verified creator badge, you must complete the publisher verification process. For more information, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)" or "[Requirements for listing an app](/developers/github-marketplace/requirements-for-listing-an-app)."
23+
To publish paid plans for your app and display a marketplace badge, you must complete the publisher verification process. For more information, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)" or "[Requirements for listing an app](/developers/github-marketplace/requirements-for-listing-an-app)."
2424

2525
Once the organization meets the requirements, someone with owner permissions in the organization can publish paid plans for any of their apps. Each app with a paid plan also goes through a financial onboarding process to enable payments.
2626

content/developers/github-marketplace/about-verified-creator-badges.md renamed to content/developers/github-marketplace/about-marketplace-badges.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
---
2-
title: About verified creator badges
3-
intro: 'Learn about the verified creator badges that are shown for some listings for apps and actions on {% data variables.product.prodname_marketplace %}.'
2+
title: About marketplace badges
3+
intro: 'Learn about the badges that you may see for some apps and actions listings on {% data variables.product.prodname_marketplace %}.'
4+
redirect_from:
5+
- /developers/github-marketplace/about-verified-creator-badges
46
versions:
57
free-pro-team: '*'
68
---
79

810
### For GitHub Apps
911

10-
Apps with the {% octicon "verified" aria-label="The verified badge" %}, or verified creator badge, are owned by an organization that has completed the publisher verification process.
12+
Apps with the {% octicon "verified" aria-label="The verified badge" %}, are owned by an organization that has:
13+
- Confirmed their domain
14+
- Confirmed their email address so {% data variables.product.prodname_dotcom %} Support can reach the organization
15+
- Required two-factor authentication for their organization. For more information, see "[Requiring two-factor authentication in your organization](/github/setting-up-and-managing-organizations-and-teams/requiring-two-factor-authentication-in-your-organization)."
1116

12-
![Verified creator badge for GitHub Apps](/assets/images/marketplace/apps-with-verified-creator-badges.png)
17+
![Marketplace badge for GitHub Apps](/assets/images/marketplace/apps-with-verified-publisher-badge.png)
1318

14-
To learn more about the publisher verification process, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)."
19+
To learn how you can add this badge to your app, see "[Applying for publisher verification for your organization](/developers/github-marketplace/applying-for-publisher-verification-for-your-organization)."
1520

1621
For more information about the requirements for listing an app on {% data variables.product.prodname_marketplace %}, see "[Requirements for listing an app on {% data variables.product.prodname_marketplace %}](/marketplace/getting-started/requirements-for-listing-an-app-on-github-marketplace/)."
1722

0 commit comments

Comments
 (0)