Skip to content

Commit 55357fa

Browse files
authored
Merge pull request #43241 from github/repo-sync
Repo sync
2 parents 31ca2cf + cb1ba5a commit 55357fa

File tree

54 files changed

+1089
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1089
-127
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Create workflow failure issue
2+
description: Create or update a GitHub issue in docs-engineering when a workflow fails, for automated diagnosis by an agentic workflow.
3+
4+
inputs:
5+
token:
6+
description: A token with issues write permission on the target repo
7+
required: true
8+
repo:
9+
description: The repository to create the issue in
10+
default: github/docs-engineering
11+
required: false
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Check for existing open issue
17+
id: check-existing
18+
shell: bash
19+
env:
20+
GH_TOKEN: ${{ inputs.token }}
21+
ISSUE_REPO: ${{ inputs.repo }}
22+
WORKFLOW_NAME: ${{ github.workflow }}
23+
run: |
24+
existing=$(gh issue list \
25+
--repo "$ISSUE_REPO" \
26+
--label "workflow-failure" \
27+
--search "in:title [Workflow Failure] $WORKFLOW_NAME" \
28+
--state open \
29+
--json number \
30+
--jq '.[0].number // empty' 2>/dev/null || true)
31+
echo "existing_issue=$existing" >> "$GITHUB_OUTPUT"
32+
33+
- name: Comment on existing issue
34+
if: steps.check-existing.outputs.existing_issue != ''
35+
shell: bash
36+
env:
37+
GH_TOKEN: ${{ inputs.token }}
38+
ISSUE_REPO: ${{ inputs.repo }}
39+
ISSUE_NUMBER: ${{ steps.check-existing.outputs.existing_issue }}
40+
WORKFLOW_NAME: ${{ github.workflow }}
41+
SOURCE_REPO: ${{ github.repository }}
42+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
43+
EVENT_NAME: ${{ github.event_name }}
44+
GIT_REF: ${{ github.ref }}
45+
run: |
46+
body=$(cat <<EOF
47+
### Repeat failure
48+
49+
**Workflow:** \`$WORKFLOW_NAME\`
50+
**Repository:** \`$SOURCE_REPO\`
51+
**Run:** $RUN_URL
52+
**Event:** \`$EVENT_NAME\`
53+
**Ref:** \`$GIT_REF\`
54+
**Timestamp:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
55+
EOF
56+
)
57+
gh issue comment "$ISSUE_NUMBER" \
58+
--repo "$ISSUE_REPO" \
59+
--body "$body"
60+
61+
- name: Create workflow failure issue
62+
if: steps.check-existing.outputs.existing_issue == ''
63+
shell: bash
64+
env:
65+
GH_TOKEN: ${{ inputs.token }}
66+
ISSUE_REPO: ${{ inputs.repo }}
67+
WORKFLOW_NAME: ${{ github.workflow }}
68+
SOURCE_REPO: ${{ github.repository }}
69+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
70+
EVENT_NAME: ${{ github.event_name }}
71+
GIT_REF: ${{ github.ref }}
72+
ACTOR: ${{ github.actor }}
73+
run: |
74+
body=$(cat <<EOF
75+
### Workflow failure
76+
77+
**Workflow:** \`$WORKFLOW_NAME\`
78+
**Repository:** \`$SOURCE_REPO\`
79+
**Run:** $RUN_URL
80+
**Event:** \`$EVENT_NAME\`
81+
**Ref:** \`$GIT_REF\`
82+
**Triggered by:** \`$ACTOR\`
83+
**Timestamp:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
84+
85+
---
86+
This issue was automatically created by the create-workflow-failure-issue action to enable automated diagnosis.
87+
EOF
88+
)
89+
gh issue create \
90+
--repo "$ISSUE_REPO" \
91+
--label "workflow-failure" \
92+
--title "[Workflow Failure] $WORKFLOW_NAME" \
93+
--body "$body"

.github/instructions/all.instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ When you create a pull request:
2929
3. Label with "llm-generated".
3030
4. If an issue exists, include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate.
3131
5. Always create PRs in **draft mode** using `--draft` flag.
32+
33+
## Accessing docs.github.com content programmatically
34+
35+
When you need to read GitHub Docs, use these endpoints on `docs.github.com` in order of preference:
36+
37+
1. `/llms.txt` — Start here. Returns a structured overview of the site with links to pagelist endpoints for each product version.
38+
2. `/api/pagelist/:lang/:version` — Returns a list of all pages for a given language and version (e.g., `/api/pagelist/en/free-pro-team@latest`). Use `/api/pagelist/versions` and `/api/pagelist/languages` for available options.
39+
3. `/api/search/v1?query=...&language=...&version=...&client_name=...` — Search docs content (e.g., `/api/search/v1?query=actions&language=en&version=free-pro-team@latest&client_name=copilot`).
40+
4. `/api/article/body?pathname=...` — Returns the rendered markdown body of a page. Handles all page types including REST, GraphQL, and webhook reference pages.

.github/workflows/codeql.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ jobs:
4141
with:
4242
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4343
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
44+
45+
- uses: ./.github/actions/create-workflow-failure-issue
46+
if: ${{ failure() && github.event_name != 'pull_request' }}
47+
with:
48+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/content-pipelines.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,8 @@ jobs:
152152
with:
153153
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
154154
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
155+
156+
- uses: ./.github/actions/create-workflow-failure-issue
157+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
158+
with:
159+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/create-changelog-pr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,8 @@ jobs:
164164
with:
165165
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
166166
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
167+
168+
- uses: ./.github/actions/create-workflow-failure-issue
169+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
170+
with:
171+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/delete-orphan-translation-files.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: Delete orphan translation files
1414
on:
1515
workflow_dispatch:
1616
schedule:
17-
- cron: '20 16 * * 3' # Run every Wednesday at 16:20 UTC / 8:20 PST — orphan & hygiene cleanup theme
17+
- cron: '20 16 * * 1' # Run every Monday at 16:20 UTC / 8:20 PST
1818

1919
permissions:
2020
contents: write
@@ -140,3 +140,8 @@ jobs:
140140
with:
141141
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
142142
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
143+
144+
- uses: ./.github/actions/create-workflow-failure-issue
145+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
146+
with:
147+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/docs-review-collect.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ jobs:
4747
with:
4848
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4949
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
50+
51+
- uses: ./.github/actions/create-workflow-failure-issue
52+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
53+
with:
54+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/enterprise-dates.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name: Enterprise date updater
1111
on:
1212
workflow_dispatch:
1313
schedule:
14-
- cron: '20 16 * * 4' # Run every Thursday at 16:20 UTC / 8:20 PST — infrastructure & releases theme
14+
- cron: '20 16 * * 1' # Run every Monday at 16:20 UTC / 8:20 PST
1515

1616
permissions:
1717
contents: write
@@ -74,3 +74,8 @@ jobs:
7474
with:
7575
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
7676
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
77+
78+
- uses: ./.github/actions/create-workflow-failure-issue
79+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
80+
with:
81+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/enterprise-release-issue.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Open Enterprise release or deprecation issue
77
on:
88
workflow_dispatch:
99
schedule:
10-
- cron: '20 16 * * 4' # Run every Thursday at 16:20 UTC / 8:20 PST — infrastructure & releases theme
10+
- cron: '20 16 * * 1' # Run every Monday at 16:20 UTC / 8:20 PST
1111

1212
permissions:
1313
contents: read
@@ -38,3 +38,8 @@ jobs:
3838
with:
3939
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4040
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
41+
42+
- uses: ./.github/actions/create-workflow-failure-issue
43+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
44+
with:
45+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/index-autocomplete-search.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ jobs:
5050
with:
5151
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
5252
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
53+
54+
- uses: ./.github/actions/create-workflow-failure-issue
55+
if: ${{ failure() && github.event_name == 'schedule' }}
56+
with:
57+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

0 commit comments

Comments
 (0)