Skip to content

Commit fd4e439

Browse files
Merge pull request #1 from github/repo-sync
Repo sync
2 parents ec3629a + 6851593 commit fd4e439

118 files changed

Lines changed: 2710 additions & 527 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: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ 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+
return changedLines.length > 0 &&
45+
changedLines.every(line => line.slice(1).trim() === '')
46+
})
4347
const onlyRenames = files.length > 0 && files.every(f => f.status === 'renamed')
4448
4549
// Close the PR and add the invalid label
46-
if (onlyDeletes || isEmptyCommit || touchesTooMany || isOneLineAddition || isBlankLineEdit || onlyRenames) {
50+
if (onlyDeletes || isEmptyCommit || touchesTooMany || isBlankLineEdit || onlyRenames) {
4751
await github.rest.issues.update({
4852
owner: owner,
4953
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

.github/workflows/sync-sdk-docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
types: [opened, synchronize, reopened]
2525
paths:
2626
- '.github/workflows/sync-sdk-docs.yml'
27+
- 'content/copilot/get-started/sdk-quickstart.md'
2728
- 'src/workflows/sync-sdk-docs/**'
2829

2930
concurrency:
@@ -77,6 +78,10 @@ jobs:
7778
- name: Copy SDK docs
7879
run: |
7980
mkdir -p "$SDK_DOCS_TARGET"
81+
# Pages relocated out of this tree into hand-authored content are not
82+
# excluded here — they are removed by the RELOCATED_PAGES map in
83+
# src/workflows/sync-sdk-docs/normalize-sdk-docs.ts, which also
84+
# repoints inbound links at their new URLs.
8085
rsync -av --exclude='.validation/' --exclude='developer-docs/' "$SDK_TMP/docs/" "$SDK_DOCS_TARGET/"
8186
echo "Copied $(find "$SDK_DOCS_TARGET" -name '*.md' | wc -l | tr -d ' ') markdown files"
8287
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

0 commit comments

Comments
 (0)