Skip to content

Commit 6803318

Browse files
authored
Merge pull request #45619 from github/repo-sync
Repo sync
2 parents a9d106d + b2c61a2 commit 6803318

8 files changed

Lines changed: 56 additions & 8 deletions

File tree

.github/workflows/check-for-spammy-pr.yml renamed to .github/workflows/check-for-spammy-prs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ jobs:
3535
});
3636
3737
const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
38+
const emptyCommit = !files.length
3839
const touchesTooMany = files.length > 10
3940
4041
// Close the PR and add the invalid label
41-
if (onlyDeletes || touchesTooMany) {
42+
if (onlyDeletes || emptyCommit || touchesTooMany) {
4243
await github.rest.issues.update({
4344
owner: owner,
4445
repo: repo,

content/get-started/learning-about-github/githubs-plans.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ See costs and features for each plan at {% data variables.product.pricing_link %
2323

2424
When you read {% data variables.product.prodname_docs %}, make sure to select the version that reflects your plan. For more information, see [AUTOTITLE](/get-started/using-github-docs/about-versions-of-github-docs).
2525

26-
## {% data variables.product.prodname_free_user %} for personal accounts
26+
## Individual plans
27+
28+
### {% data variables.product.prodname_free_user %} for personal accounts
2729

2830
With {% data variables.product.prodname_free_team %} for personal accounts, you can work with unlimited collaborators on unlimited public repositories with a full feature set, and on unlimited private repositories with a limited feature set.
2931

@@ -40,7 +42,7 @@ With {% data variables.product.prodname_free_user %}, your personal account incl
4042
* Deployment protection rules for public repositories
4143
* GitHub Pages in public repositories
4244

43-
## {% data variables.product.prodname_pro %}
45+
### {% data variables.product.prodname_pro %}
4446

4547
In addition to the features available with {% data variables.product.prodname_free_user %} for personal accounts, {% data variables.product.prodname_pro %} includes:
4648
* {% data variables.contact.github_support %} via email
@@ -63,7 +65,9 @@ In addition to the features available with {% data variables.product.prodname_fr
6365
* Repository insights graphs: Pulse, contributors, traffic, commits, code frequency, network, and forks
6466
{% data reusables.repositories.repo-insights-commit-limit %}
6567

66-
## {% data variables.product.prodname_free_team %} for organizations
68+
## Organization and enterprise plans
69+
70+
### {% data variables.product.prodname_free_team %} for organizations
6771

6872
With {% data variables.product.prodname_free_team %} for organizations, you can work with unlimited collaborators on unlimited public repositories with a full feature set, or unlimited private repositories with a limited feature set.
6973

@@ -72,7 +76,7 @@ In addition to the features available with {% data variables.product.prodname_fr
7276
* Team access controls for managing groups
7377
* 2,000 {% data variables.product.prodname_actions %} minutes per month
7478

75-
## {% data variables.product.prodname_team %}
79+
### {% data variables.product.prodname_team %}
7680

7781
In addition to the features available with {% data variables.product.prodname_free_team %} for organizations, {% data variables.product.prodname_team %} includes:
7882
* {% data variables.contact.github_support %} via email
@@ -109,7 +113,7 @@ In addition to the features available with {% data variables.product.prodname_fr
109113

110114
{% data reusables.actions.actions-billing %}
111115

112-
## {% data variables.product.prodname_enterprise %}
116+
### {% data variables.product.prodname_enterprise %}
113117

114118
{% data variables.product.prodname_enterprise %} includes two deployment options: {% data variables.product.prodname_ghe_cloud %}, which is hosted by {% data variables.product.company_short %} in the cloud, and {% data variables.product.prodname_ghe_server %}, which is self-hosted. For more information, see [About {% data variables.product.prodname_dotcom %} for enterprises]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/overview/about-github-for-enterprises){% ifversion fpt %} in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}.{% endif %}
115119

@@ -143,4 +147,4 @@ You can set up trials to evaluate {% data variables.product.prodname_ghe_cloud %
143147

144148
## Further reading
145149

146-
* [About per-user pricing]({% ifversion not ghec %}/enterprise-cloud@latest{% endif %}/billing/managing-the-plan-for-your-github-account/about-per-user-pricing){% ifversion not ghec %} in the {% data variables.product.prodname_ghe_cloud %} documentation{% endif %}
150+
* [About per-user pricing]({% ifversion not ghec %}/enterprise-cloud@latest{% endif %}/billing/managing-the-plan-for-your-github-account/about-per-user-pricing){% ifversion not ghec %} in the {% data variables.product.prodname_ghe_cloud %} documentation{% endif %}

content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ Prevent commits that include changes in specified file paths from being pushed t
319319

320320
{% data reusables.repositories.rulesets-push-rules-path-example %}
321321

322+
{% ifversion push-rule-allowed-exceptions %}
323+
324+
You can also add allowed exceptions to this rule. A file matching an allowed exception can be pushed even when it also matches a restricted path.
325+
326+
{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}
327+
328+
{% endif %}
329+
322330
## Restrict file path length
323331

324332
Prevent commits that include file paths that exceed a specified character limit from being pushed to the repository.
@@ -327,6 +335,20 @@ Prevent commits that include file paths that exceed a specified character limit
327335

328336
Prevent commits that include files with specified file extensions from being pushed to the repository. {% ifversion available-rules-limit %}Limit is 200 entries and up to 200 characters in each entry.{% endif %}
329337

338+
{% ifversion push-rule-allowed-exceptions %}
339+
340+
If you need to allow an exception for a single file of an otherwise blocked file type, use "Restrict file paths" with a pattern such as `**/*.jar`. Only the "Restrict file paths" and "Restrict file size" rules support allowed exceptions.
341+
342+
{% endif %}
343+
330344
## Restrict file size
331345

332346
Prevent commits that exceed a specified file size limit from being pushed to the repository.
347+
348+
{% ifversion push-rule-allowed-exceptions %}
349+
350+
You can also add allowed exceptions to this rule. A file matching an allowed exception can exceed the file size limit.
351+
352+
{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}
353+
354+
{% endif %}

content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/troubleshooting-rules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ If a branch or tag is targeted by rules restricting the metadata of commits, you
2121

2222
When utilizing push rulesets, a maximum of 1000 reference updates are allowed per push. If your push exceeds this limit, it will be rejected. For more information see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#creating-a-push-ruleset).
2323

24+
{% ifversion push-rule-allowed-exceptions %}
25+
26+
If your push is blocked by a rule restricting file paths or file size, check whether the ruleset defines allowed exceptions. A repository, organization, or enterprise administrator can add an allowed exception for a file that must remain pushable. See [Restrict file paths](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#restrict-file-paths) and [Restrict file size](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#restrict-file-size).
27+
28+
{% endif %}
29+
2430
Additionally, push rulesets apply to the "Create a blob", "Create a tree", and "Create or update file contents" endpoints in the REST API. See [AUTOTITLE](/rest/git/blobs?apiVersion=2022-11-28#create-a-blob), [AUTOTITLE](/rest/git/trees?apiVersion=2022-11-28#create-a-tree), and [AUTOTITLE](/rest/repos/contents?apiVersion=2022-11-28#create-or-update-file-contents).
2531

2632
## Troubleshooting required status checks
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: github/releases#9966
2+
# "Allowed exceptions" (ignored_file_paths) for the Restrict file paths
3+
# and Restrict file size push rules.
4+
# GHES availability TBC — add a ghes key once confirmed.
5+
versions:
6+
fpt: '*'
7+
ghec: '*'

data/reusables/repositories/push-rulesets-overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ Push rulesets allow you to:
77
* **Restrict file paths:** Prevent commits that include changes in specified file paths from being pushed.
88

99
{% data reusables.repositories.rulesets-push-rules-path-example %}
10+
11+
{% ifversion push-rule-allowed-exceptions %}You can add allowed exceptions for paths that should remain pushable.{% endif %}
1012
* **Restrict file path length:** Prevent commits that include file paths that exceed a specified character limit from being pushed.
1113
* **Restrict file extensions:** Prevent commits that include files with specified file extensions from being pushed.
12-
* **Restrict file size:** Prevent commits that exceed a specified file size limit from being pushed.
14+
* **Restrict file size:** Prevent commits that exceed a specified file size limit from being pushed.{% ifversion push-rule-allowed-exceptions %} You can add allowed exceptions for files that may exceed the limit.{% endif %}
1315

1416
### About push rulesets for forked repositories
1517

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allowed exceptions use `fnmatch` syntax and are validated when you save the ruleset. For example, `**/gradle/wrapper/*.jar` allows the Gradle wrapper JAR file in any directory.

data/reusables/repositories/rulesets-push-rules-step.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ Any push protections you configure will block pushes in this repository and thro
55
1. Under "Push protections," click the restrictions you want to apply. Then fill in the details for the restrictions you select.
66

77
For file path restrictions, you can use partial or full paths. {% data reusables.repositories.rulesets-push-rules-path-example %}
8+
{%- ifversion push-rule-allowed-exceptions %}
9+
1. Optionally, for the "Restrict file paths" and "Restrict file size" restrictions, under "Allowed exceptions," add the file paths you want to exempt from the restriction.
10+
11+
{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}
12+
{%- endif %}

0 commit comments

Comments
 (0)