Skip to content

Commit 16ef992

Browse files
authored
Delete the diy docs steps for now, for testing (#55002)
1 parent 3ac37ee commit 16ef992

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

.github/workflows/ready-for-doc-review.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -43,57 +43,6 @@ jobs:
4343
echo "AUTHOR_LOGIN=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
4444
fi
4545
46-
# Check if the PR is connected to an issue that has the DIY docs label. The grep command parses through the PR description to find issue numbers that are linked in the PR description. The GitHub CLI command then checks if the issue exists in the docs-content repo, then checks if the linked docs-content issues have the DIY docs label. If the linked issues have the DIY docs label, the DIY_DOCS_LABEL environment variable is set to true.
47-
- name: Check if PR is connected to DIY docs issue
48-
if: github.repository == 'github/docs-internal'
49-
id: check-diy-docs
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
52-
run: |
53-
echo "Extracting issue numbers from PR description..."
54-
55-
# Get issue numbers directly using gh pr view
56-
ISSUE_NUMS=$(gh pr view ${{ github.event.pull_request.number }} --json body -q .body | \
57-
grep -oE '(https://github.com/github/docs-content/issues/[0-9]+|github/docs-content#[0-9]+|#[0-9]+)' | \
58-
grep -oE '[0-9]+$' || echo "")
59-
echo "Extracted docs-content issue numbers: $ISSUE_NUMS"
60-
61-
if [ -n "$ISSUE_NUMS" ]; then
62-
for ISSUE_NUM in $ISSUE_NUMS; do
63-
echo "Checking issue #$ISSUE_NUM in the docs-content repository..."
64-
if gh issue view $ISSUE_NUM --repo github/docs-content --json labels -q '.labels[].name' | grep -q 'DIY docs'; then
65-
echo "DIY docs label found for issue #$ISSUE_NUM."
66-
echo "DIY_DOCS_LABEL=true" >> $GITHUB_ENV
67-
break
68-
else
69-
echo "Issue #$ISSUE_NUM exists but does not have the DIY docs label."
70-
fi
71-
done
72-
else
73-
echo "No DIY docs issues found in the PR description."
74-
fi
75-
76-
# Debug step to confirm environment variables are set correctly
77-
- name: Debug environment variables
78-
run: |
79-
echo "Current environment variables:"
80-
echo "DIY_DOCS_LABEL: $DIY_DOCS_LABEL"
81-
echo "Repository: ${{ github.repository }}"
82-
83-
# If the PR description contains a link to a DIY docs issue, add the DIY docs label to the PR.
84-
- name: Add the DIY docs label if connected to a DIY docs issue
85-
if: ${{ env.DIY_DOCS_LABEL == 'true' }} && github.repository == 'github/docs-internal'
86-
env:
87-
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
88-
PR_URL: ${{ github.event.pull_request.html_url }}
89-
run: |
90-
# Debugging output
91-
echo "Condition check:"
92-
echo "DIY_DOCS_LABEL is: $DIY_DOCS_LABEL"
93-
echo "github.repository is: ${{ github.repository }}"
94-
echo "Adding the DIY docs label..."
95-
gh pr edit $PR_URL --add-label 'DIY docs'
96-
9746
- name: Run script
9847
run: |
9948
npm run ready-for-docs-review

0 commit comments

Comments
 (0)