Skip to content

Commit 9c6360d

Browse files
authored
Merge branch 'main' into 3488-dependabot-ecosystem-version
2 parents 6ecd6ce + cef68e5 commit 9c6360d

76 files changed

Lines changed: 307999 additions & 4461 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.
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+
});

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/admin/configuration/command-line-utilities.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ $ ghe-config -l
7474
```
7575
Allows you to find the uuid of your node in `cluster.conf`.
7676

77-
``` shell
78-
$ ghe-config _hostname_.uuid
77+
```shell
78+
$ ghe-config <em>HOSTNAME</em>.uuid
7979
```
8080

8181
{% if currentVersion ver_gt "enterprise-server@2.21" %}
@@ -543,8 +543,8 @@ ghe-dpages status
543543
```
544544

545545
To evacuate a {% data variables.product.prodname_pages %} storage service before evacuating a cluster node:
546-
``` shell
547-
ghe-dpages evacuate pages-server-<uuid>
546+
```shell
547+
ghe-dpages evacuate pages-server-<em>UUID</em>
548548
```
549549

550550
#### ghe-spokes
@@ -569,16 +569,16 @@ ghe-spokes route
569569

570570
To evacuate storage services on a cluster node:
571571

572-
``` shell
573-
ghe-spokes server evacuate git-server-<uuid>
572+
```shell
573+
ghe-spokes server evacuate git-server-<em>UUID</em>
574574
```
575575

576576
#### ghe-storage
577577

578578
This utility allows you to evacuate all storage services before evacuating a cluster node.
579579

580-
``` shell
581-
ghe-storage evacuate storage-server-<uuid>
580+
```shell
581+
ghe-storage evacuate storage-server-<em>UUID</em>
582582
```
583583

584584
### Git

content/admin/enterprise-management/configuring-high-availability-replication-for-a-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ versions:
1010

1111
### About high availability replication for clusters
1212

13-
You can configure a cluster deployment of {% data variables.product.prodname_ghe_server %} for high availability, where an identical set of passive nodes sync with the nodes in your active cluster. If hardware or software failures affect the datacenter with your active cluster, you can manually fail over to the replica nodes and continue processing user requests without data loss.
13+
You can configure a cluster deployment of {% data variables.product.prodname_ghe_server %} for high availability, where an identical set of passive nodes sync with the nodes in your active cluster. If hardware or software failures affect the datacenter with your active cluster, you can manually fail over to the replica nodes and continue processing user requests, minimizing the impact of the outage.
1414

1515
In high availability mode, each active node syncs regularly with a corresponding passive node. The passive node runs in standby and does not serve applications or process user requests.
1616

content/admin/overview/managing-your-github-enterprise-license.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You can allocate the user licenses included in your {% data variables.product.pr
2424

2525
If your {% data variables.product.prodname_ghe_server %} license expires, you won't be able to access {% data variables.product.product_location_enterprise %} via a web browser or Git. If needed, you will be able to use command-line utilities to back up all your data. For more information, see "[Configuring backups on your appliance](/enterprise/admin/guides/installation/configuring-backups-on-your-appliance)." If you have any questions about renewing your license, contact {% data variables.contact.contact_enterprise_sales %}.
2626

27-
### Uploading a new license to {% data variables.product.prodname_ghe_server %}
27+
### Uploading a new license to {% data variables.product.prodname_ghe_server %}
2828

2929
After you purchase a new license or upgrade an existing license from {% data variables.contact.contact_enterprise_sales %}, you must download your new license file, then upload the file to {% data variables.product.prodname_ghe_server %} to unlock your new user licenses.
3030

@@ -45,7 +45,9 @@ If you'd like to renew or add user licenses to {% data variables.product.prodnam
4545
13. To select your license, click **License file**, or drag your license file onto **License file**.
4646
![Upload license file](/assets/images/enterprise/management-console/upload-license.png)
4747
14. Click **Upload**.
48-
![Begin upgrade](/assets/images/enterprise/management-console/begin-upload.png)
48+
![Begin upload](/assets/images/enterprise/management-console/begin-upload.png)
49+
50+
{% if enterpriseVersion ver_lt "enterprise-server@3.0" %}If the web UI for {% data variables.product.prodname_ghe_server %} doesn't reflect your updated license immediately, see "[Troubleshooting](#troubleshooting)."{% endif %}
4951

5052
### Viewing license usage
5153

@@ -77,3 +79,23 @@ You can download a JSON file from {% data variables.product.prodname_ghe_server
7779
![Upload GitHub Enterprise Servers usage link](/assets/images/help/business-accounts/upload-ghe-server-usage-link.png)
7880
11. Upload the JSON file you downloaded from {% data variables.product.prodname_ghe_server %}.
7981
![Drag and drop or select a file to upload](/assets/images/help/business-accounts/upload-ghe-server-usage-file.png)
82+
83+
{% if currentVersion ver_lt "enterprise-server@3.0" %}
84+
85+
### Troubleshooting
86+
87+
In some scenarios, the web UI for {% data variables.product.prodname_ghe_server %} may not immediately reflect your new license. You can force the system to detect the license by restarting two system services.
88+
89+
{% data reusables.enterprise_installation.ssh-into-instance %}
90+
1. Restart the services for Git authentication and the HTTP server.
91+
92+
{% warning %}
93+
94+
**Warning**: Running the following command will result in a few minutes of user-facing downtime for {% data variables.product.prodname_ghe_server %}. Run the command with care.
95+
96+
{% endwarning %}
97+
98+
sudo systemctl restart github-gitauth github-unicorn
99+
1. After {% data variables.product.prodname_ghe_server %} returns you to a prompt, try accessing {% data variables.product.prodname_ghe_server %} via the command line or web UI again.
100+
101+
{% endif %}

content/admin/user-management/viewing-push-logs.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ Push log entries show:
2222

2323
### Viewing a repository's push logs
2424

25+
1. Sign into {% data variables.product.prodname_ghe_server %} as a site administrator.
2526
1. Navigate to a repository.
26-
{% data reusables.enterprise_site_admin_settings.access-settings %}
27+
1. In the upper-right corner of the repository's page, click {% octicon "rocket" aria-label="The rocket ship" %}.
28+
![Rocketship icon for accessing site admin settings](/assets/images/enterprise/site-admin-settings/access-new-settings.png)
2729
{% data reusables.enterprise_site_admin_settings.security-tab %}
2830
4. In the left sidebar, click **Push Log**.
2931
![Push log tab](/assets/images/enterprise/site-admin-settings/push-log-tab.png)
3032

3133
{% if enterpriseServerVersions contains currentVersion %}
3234
### Viewing a repository's push logs on the command-line
3335

34-
1. SSH into your appliance. For more information, see "[Accessing the administrative shell (SSH)](/enterprise/{{ currentVersion }}/admin/guides/installation/accessing-the-administrative-shell-ssh/)."
35-
2. In the appropriate Git repository, open the audit log file:
36+
{% data reusables.enterprise_installation.ssh-into-instance %}
37+
1. In the appropriate Git repository, open the audit log file:
3638
```shell
3739
ghe-repo <em>owner</em>/<em>repository</em> -c "less audit_log"
3840
```

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/education/teach-and-learn-with-github-education/about-campus-advisors.md renamed to content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-campus-advisors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: About Campus Advisors
33
intro: 'As an instructor or mentor, learn to use {% data variables.product.prodname_dotcom %} at your school with Campus Advisors training and support.'
44
redirect_from:
5+
- /education/teach-and-learn-with-github-education/about-campus-advisors
56
- /github/teaching-and-learning-with-github-education/about-campus-advisors
67
- /articles/about-campus-advisors
78
versions:

content/education/teach-and-learn-with-github-education/about-campus-experts.md renamed to content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-campus-experts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: About Campus Experts
33
intro: 'As a student, learn the skills you need to build your school''s technology community and a real-world portfolio, with {% data variables.product.prodname_dotcom %} Campus Experts training.'
44
redirect_from:
5+
- /education/teach-and-learn-with-github-education/about-campus-experts
56
- /github/teaching-and-learning-with-github-education/about-campus-experts
67
- /articles/about-campus-experts
78
versions:

content/education/teach-and-learn-with-github-education/about-github-education-for-educators-and-researchers.md renamed to content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/about-github-education-for-educators-and-researchers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: About GitHub Education for educators and researchers
33
intro: '{% data variables.product.prodname_education %} offers a variety of tools to help educators and researchers work more effectively inside and outside of the classroom.'
44
redirect_from:
5+
- /education/teach-and-learn-with-github-education/about-github-education-for-educators-and-researchers
56
- /github/teaching-and-learning-with-github-education/about-github-education-for-educators-and-researchers
67
- /articles/about-github-education-for-educators-and-researchers
78
versions:

0 commit comments

Comments
 (0)