Skip to content

Commit 5359949

Browse files
authored
Merge branch 'main' into docs/clarify-dependency-graph-enabled
2 parents 45e6721 + 0397eae commit 5359949

84 files changed

Lines changed: 2369 additions & 465 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/agents/dependabot-ecosystem-update.md

Lines changed: 634 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/check-for-spammy-issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
const titleWordCountMin = 3
3131
const urlRegex = /https?:\/\/\S+/i
3232
const titleHasUrl = urlRegex.test(issue.title)
33+
const titleHasDollarSign = issue.title.includes('$')
3334
3435
try {
3536
await github.rest.teams.getMembershipForUserInOrg({
@@ -45,7 +46,7 @@ jobs:
4546
// An error will be thrown if the user is not a GitHub employee
4647
// 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
4748
48-
if (titleWordCount >= titleWordCountMin && !titleHasUrl) {
49+
if (titleWordCount >= titleWordCountMin && !titleHasUrl && !titleHasDollarSign) {
4950
return
5051
}
5152
}

.github/workflows/check-for-spammy-prs.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ jobs:
3737
const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
3838
const isEmptyCommit = !files.length
3939
const touchesTooMany = files.length > 10
40-
const totalChanges = files.reduce((sum, f) => sum + f.additions + f.deletions, 0)
41-
const isOneLineAddition = files.every(f => f.status === 'added') && totalChanges <= 1
42-
const isBlankLineEdit = totalChanges <= 1 && files.every(f => f.status === 'modified')
40+
const isBlankLineEdit = files.length > 0 && files.every(file => {
41+
const changedLines = (file.patch || '')
42+
.split('\n')
43+
.filter(line => /^[+-]/.test(line))
44+
)
45+
46+
return changedLines.length > 0 &&
47+
changedLines.every(line => line.slice(1).trim() === '')
48+
})
4349
const onlyRenames = files.length > 0 && files.every(f => f.status === 'renamed')
4450
4551
// Close the PR and add the invalid label
46-
if (onlyDeletes || isEmptyCommit || touchesTooMany || isOneLineAddition || isBlankLineEdit || onlyRenames) {
52+
if (onlyDeletes || isEmptyCommit || touchesTooMany || isBlankLineEdit || onlyRenames) {
4753
await github.rest.issues.update({
4854
owner: owner,
4955
repo: repo,
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Add new issues and PRs to central triage board
2+
3+
# **What it does**: Adds newly opened or reopened issues and pull requests in github/docs to the right place for triage, and stamps the item with today's date.
4+
# **Why we have it**: To ensure incoming work in the public docs repo is triaged properly.
5+
# **Who does it impact**: Writers, FRs.
6+
7+
on:
8+
issues:
9+
types: [opened, reopened]
10+
pull_request_target:
11+
types: [opened, reopened, ready_for_review]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
add-to-central-triage:
18+
runs-on: ubuntu-latest
19+
if: github.repository == 'github/docs'
20+
steps:
21+
- name: Triage to central triage board
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
24+
ITEM_URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}
25+
# Add to the Central Triage Group project board and set date to now
26+
PROJECT_NUMBER: '19598'
27+
PROJECT_ID: 'PVT_kwDNJr_OAJ4AfQ'
28+
DATE_FIELD_ID: 'PVTF_lADNJr_OAJ4Afc4IAbbv'
29+
run: |
30+
echo "Adding $ITEM_URL to project $PROJECT_NUMBER..."
31+
ITEM_ID=$(gh project item-add "$PROJECT_NUMBER" --owner github --url "$ITEM_URL" --format json --jq '.id' || true)
32+
33+
sleep 10
34+
35+
if [ -n "$ITEM_ID" ] && [ "$ITEM_ID" != "null" ]; then
36+
echo "Editing date on item $ITEM_ID..."
37+
DATE=$(date '+%Y-%m-%d')
38+
if gh project item-edit --project-id "$PROJECT_ID" --id "$ITEM_ID" --field-id "$DATE_FIELD_ID" --date "$DATE"; then
39+
echo "done editing"
40+
else
41+
echo "::warning::gh project item-edit failed for $ITEM_URL (item $ITEM_ID); the item is on the board but the date field was not set"
42+
fi
43+
else
44+
echo "::warning::gh project item-add did not return an item id for $ITEM_URL; skipping item-edit"
45+
fi
67.8 KB
Loading

content/account-and-profile/tutorials/personalize-your-profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ category:
2525
---
2626

2727
> [!NOTE]
28-
> Your profile name for your is {% data variables.product.github %} account is **required**. All other profile information described in this article is **optional**.
28+
> Your profile name for your {% data variables.product.github %} account is **required**. All other profile information described in this article is **optional**.
2929
3030
## Changing your profile picture
3131

content/actions/concepts/security/openid-connect.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ To use OIDC in your workflows, you must establish a trust relationship between {
9999

100100
Before granting an access token, your cloud provider checks that the [`subject`](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) and any other claims used to set conditions in its trust settings match those in the request's JSON Web Token (JWT). If the trust configuration matches, your cloud provider issues a temporary access token to the workflow.
101101

102+
{% ifversion dependabot-oidc-support %}
103+
104+
OIDC tokens requested for {% data variables.product.prodname_dependabot %} update jobs have an `event_name` claim of `dynamic`. If your trust policy is intended to authorize only {% data variables.product.prodname_actions %} workflows and your cloud provider supports conditions on `event_name`, allow only the event names expected by your workflows.
105+
106+
{% endif %}
107+
102108
For steps and syntax for configuring OIDC trust and setting conditions for cloud providers, see [AUTOTITLE](/actions/reference/security/oidc#oidc-claims-used-to-define-trust-conditions-on-cloud-roles).
103109

104110
## Configuring OIDC on {% data variables.enterprise.data_residency_site %}

content/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-jfrog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For an example {% data variables.product.prodname_actions %} workflow using the
3434

3535
* To be secure, you need to set a Claims JSON in JFrog when configuring identity mappings. For more information, see [AUTOTITLE](https://jfrog.com/help/r/jfrog-platform-administration-documentation/configure-identity-mappings) and [AUTOTITLE](/actions/reference/security/oidc#customizing-the-token-claims).
3636

37-
For example, you can set `iss` to `https://token.actions.githubusercontent.com`, and the `repository` to something like "octo-org/octo-repo"`. This will ensure only Actions workflows from the specified repository will have access to your JFrog platform. The following is an example Claims JSON when configuring identity mappings.
37+
For example, you can set `iss` to `https://token.actions.githubusercontent.com`, and the `repository` to something like `octo-org/octo-repo`.{% ifversion dependabot-oidc-support %} JFrog identity mappings match each claim against an exact value, so to ensure only {% data variables.product.prodname_actions %} workflows from the specified repository have access to your JFrog platform, also set `event_name` to the event that triggers your workflow, such as `push`. This prevents OIDC tokens requested for {% data variables.product.prodname_dependabot %} update jobs, which have an `event_name` of `dynamic`, from matching the identity mapping. If your workflows are triggered by more than one event, create a separate identity mapping for each event name.{% endif %} The following is an example Claims JSON when configuring identity mappings.
3838

3939
{% data reusables.actions.jfrog-json-configuring-identity-mappings %}
4040

content/actions/reference/security/oidc.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The OIDC token includes the following claims.
6060
| `enterprise_id`| The ID of the enterprise that contains the repository from where the workflow is running. |
6161
| {% endif %} |
6262
| `environment`| The name of the environment used by the job. If the `environment` claim is included (also via `include_claim_keys`), an environment is required and must be provided. |
63-
| `event_name`| The name of the event that triggered the workflow run. |
63+
| `event_name`| The name of the event that triggered the workflow run.{% ifversion dependabot-oidc-support %} OIDC tokens requested for {% data variables.product.prodname_dependabot %} update jobs use `dynamic` as the value.{% endif %} |
6464
| `head_ref`| The source branch of the pull request in a workflow run. |
6565
| `job_workflow_ref`| For jobs using a reusable workflow, the ref path to the reusable workflow. For more information, see [AUTOTITLE](/actions/how-tos/secure-your-work/security-harden-deployments/oidc-with-reusable-workflows). |
6666
| `job_workflow_sha`| For jobs using a reusable workflow, the commit SHA for the reusable workflow file. |
@@ -107,6 +107,12 @@ If you need more granular trust conditions, you can customize the {% ifversion g
107107

108108
There are also many additional claims supported in the OIDC token that can be used for setting these conditions. In addition, your cloud provider could allow you to assign a role to the access tokens, letting you specify even more granular permissions.
109109

110+
{% ifversion dependabot-oidc-support %}
111+
112+
OIDC tokens requested for {% data variables.product.prodname_dependabot %} update jobs have an `event_name` claim of `dynamic`. If your trust policy is intended to authorize only {% data variables.product.prodname_actions %} workflows and your cloud provider supports conditions on `event_name`, allow only the event names expected by your workflows.
113+
114+
{% endif %}
115+
110116
> [!NOTE]
111117
> To control how your cloud provider issues access tokens, you **must** define at least one condition, so that untrusted repositories can’t request access tokens for your cloud resources.
112118

content/actions/tutorials/use-actions-runner-controller/get-started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ In order to use ARC, ensure you have the following.
4545

4646
For additional Helm configuration options, see [`values.yaml`](https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set-controller/values.yaml) in the ARC documentation.
4747

48-
1. To enable ARC to authenticate to {% data variables.product.company_short %}, generate a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/actions/how-tos/manage-runners/use-actions-runner-controller/authenticate-to-the-api#authenticating-arc-with-a-personal-access-token-classic).
48+
1. To enable ARC to authenticate to {% data variables.product.company_short %}, choose an authentication method for your runner scale set. If you are registering runners at the repository or organization level, we recommend authenticating with a {% data variables.product.prodname_github_app %}. Runner scale sets registered at the enterprise level require {% data variables.product.pat_v1 %} authentication. For more information, see [AUTOTITLE](/actions/how-tos/manage-runners/use-actions-runner-controller/authenticate-to-the-api).
4949

5050
## Configuring a runner scale set
5151

@@ -56,10 +56,11 @@ In order to use ARC, ensure you have the following.
5656
* Update the `INSTALLATION_NAME` value carefully. You will use the installation name as the value of `runs-on` in your workflows. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idruns-on).
5757
* Update the `NAMESPACE` value to the location you want the runner pods to be created.
5858
* Set `GITHUB_CONFIG_URL` to the URL of your repository, organization, or enterprise. This is the entity that the runners will belong to.
59+
* This example uses a {% data variables.product.pat_v1 %} to keep the initial setup short. For repository or organization runner scale sets, use a {% data variables.product.prodname_github_app %} in production environments when possible.
5960
{% ifversion fpt %}
60-
* Set `GITHUB_PAT` to a {% data variables.product.company_short %} {% data variables.product.pat_generic %} with the `repo` and `admin:org` scopes for repository and organization runners.
61+
* Set `GITHUB_PAT` to a {% data variables.product.company_short %} {% data variables.product.pat_v1 %} with the `repo` and `admin:org` scopes for repository and organization runners.
6162
{% else %}
62-
* Set `GITHUB_PAT` to a {% data variables.product.company_short %} {% data variables.product.pat_generic %} with the `repo` and `manage_runners:org` scopes for repository and organization runners, and the `manage_runners:enterprise` scope for enterprise runners.
63+
* Set `GITHUB_PAT` to a {% data variables.product.company_short %} {% data variables.product.pat_v1 %} with the `repo` and `manage_runners:org` scopes for repository and organization runners, and the `manage_runners:enterprise` scope for enterprise runners.
6364
{% endif %}
6465
* This example command installs the latest version of the Helm chart. To install a specific version, you can pass the `--version` argument with the version of the chart you wish to install. You can find the list of releases in the [GitHub Container Registry](https://github.com/actions/actions-runner-controller/pkgs/container/actions-runner-controller-charts%2Fgha-runner-scale-set).
6566

0 commit comments

Comments
 (0)