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
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
});

const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
const emptyCommit = !files.length
const touchesTooMany = files.length > 10

// Close the PR and add the invalid label
if (onlyDeletes || touchesTooMany) {
if (onlyDeletes || emptyCommit || touchesTooMany) {
await github.rest.issues.update({
owner: owner,
repo: repo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ jobs:
id: idtoken
with:
script: |
const coredemo = require('@actions/core')
let id_token = await coredemo.getIDToken()
coredemo.setOutput('id_token', id_token)
let id_token = await core.getIDToken()
core.setOutput('id_token', id_token)
```
### Requesting the JWT using environment variables
Expand Down
16 changes: 10 additions & 6 deletions content/get-started/learning-about-github/githubs-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ See costs and features for each plan at {% data variables.product.pricing_link %

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).

## {% data variables.product.prodname_free_user %} for personal accounts
## Individual plans

### {% data variables.product.prodname_free_user %} for personal accounts

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.

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

## {% data variables.product.prodname_pro %}
### {% data variables.product.prodname_pro %}

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

## {% data variables.product.prodname_free_team %} for organizations
## Organization and enterprise plans

### {% data variables.product.prodname_free_team %} for organizations

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.

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

## {% data variables.product.prodname_team %}
### {% data variables.product.prodname_team %}

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

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

## {% data variables.product.prodname_enterprise %}
### {% data variables.product.prodname_enterprise %}

{% 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 %}

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

## Further reading

* [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 %}
* [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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,14 @@ Prevent commits that include changes in specified file paths from being pushed t

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

{% ifversion push-rule-allowed-exceptions %}

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.

{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}

{% endif %}

## Restrict file path length

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

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 %}

{% ifversion push-rule-allowed-exceptions %}

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.

{% endif %}

## Restrict file size

Prevent commits that exceed a specified file size limit from being pushed to the repository.

{% ifversion push-rule-allowed-exceptions %}

You can also add allowed exceptions to this rule. A file matching an allowed exception can exceed the file size limit.

{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}

{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ If a branch or tag is targeted by rules restricting the metadata of commits, you

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).

{% ifversion push-rule-allowed-exceptions %}

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).

{% endif %}

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).

## Troubleshooting required status checks
Expand Down
7 changes: 7 additions & 0 deletions data/features/push-rule-allowed-exceptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Reference: github/releases#9966
# "Allowed exceptions" (ignored_file_paths) for the Restrict file paths
# and Restrict file size push rules.
# GHES availability TBC — add a ghes key once confirmed.
versions:
fpt: '*'
ghec: '*'
4 changes: 3 additions & 1 deletion data/reusables/repositories/push-rulesets-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ Push rulesets allow you to:
* **Restrict file paths:** Prevent commits that include changes in specified file paths from being pushed.

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

{% ifversion push-rule-allowed-exceptions %}You can add allowed exceptions for paths that should remain pushable.{% endif %}
* **Restrict file path length:** Prevent commits that include file paths that exceed a specified character limit from being pushed.
* **Restrict file extensions:** Prevent commits that include files with specified file extensions from being pushed.
* **Restrict file size:** Prevent commits that exceed a specified file size limit from being pushed.
* **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 %}

### About push rulesets for forked repositories

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +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.
5 changes: 5 additions & 0 deletions data/reusables/repositories/rulesets-push-rules-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ Any push protections you configure will block pushes in this repository and thro
1. Under "Push protections," click the restrictions you want to apply. Then fill in the details for the restrictions you select.

For file path restrictions, you can use partial or full paths. {% data reusables.repositories.rulesets-push-rules-path-example %}
{%- ifversion push-rule-allowed-exceptions %}
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.

{% data reusables.repositories.rulesets-push-rules-allowed-exceptions %}
{%- endif %}
Loading