1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Update PR review auto-comments (#54362)

This commit is contained in:
Kevin Heis
2025-02-11 13:05:04 -08:00
committed by GitHub
parent bd7faa7feb
commit c1db7a3043
5 changed files with 61 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
name: Code changes comment
# **What it does**: When a PR is opened in docs-internal or docs containing code, it comments with instructions on how to deploy and preview the changes.
# **Why we have it**: To help Docs contributors understand how to preview their changes.
# **What it does**: When a PR is opened in docs-internal or docs containing code, it comments with instructions on how to deploy and review the changes.
# **Why we have it**: To help Docs contributors understand how to review their changes.
# **Who does it impact**: docs-internal and docs maintainers and contributors
on:
@@ -49,22 +49,29 @@ jobs:
run: |
if [[ "${{ github.repository }}" == "github/docs" ]]; then
COMMENT_BODY="<!-- CODE_CHANGES_COMMENT -->
## 🚀 Manual Deployment Required
### 👓 How to review these changes
It looks like this pull request contains code changes. To preview these changes, an internal Hubber will need to manually deploy the changes to one of our staging servers.
Thank you for your contribution. To review these changes, you can:
Thank you for your contribution!"
1. [Spin up a codespace](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace)
1. [Set up a local development environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment)
This pull request contains code changes, so we will not generate a table of review links. A Hubber will need to deploy your changes internally to review.
🤖 This comment is automatically generated."
else
COMMENT_BODY="<!-- CODE_CHANGES_COMMENT -->
## 🚀 Manual Deployment Required
### 👓 How to review these changes
It looks like this pull request contains code changes. To preview these changes, please do one of:
Thank you for your contribution. To review these changes, you can:
1. [Set up a local development environment](https://github.com/github/docs/blob/main/contributing/development.md).
1. [Spin up a codespace to review](https://github.com/github/docs-engineering/blob/main/docs/team-practices/use-a-codespace-to-review.md).
1. [Spin up a codespace](https://github.com/github/docs-team/blob/main/contributing-to-docs/use-a-codespace-to-review.md).
1. [Set up a local development environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment).
1. Message \`#docs-engineering\` on Slack for a staging server.
Thank you for your contribution!"
This pull request contains code changes, so we will not generate a table of review links.
🤖 This comment is automatically generated."
fi
gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT_BODY"

View File

@@ -1,6 +1,6 @@
name: Content Changes Table Comment
# **What it does**: When a PR is opened in docs-internal or docs, it adds the staging preview and live article links in a Content Directory Changes table in a comment
# **What it does**: When a PR is opened in docs-internal or docs, it adds the staging review and live article links in a Content Directory Changes table in a comment
# **Why we have it**: To help Docs Content team members and contributors automatically have their staging/live article links added to the table
# **Who does it impact**: docs-internal/docs maintainers and contributors
@@ -89,22 +89,30 @@ jobs:
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
body: |
<!-- MODIFIED_CONTENT_LINKING_COMMENT -->
## 👓 Previews for changed content
**This comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch.**
### 👓 How to review these changes
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the review server. Please note that changes to the `data` directory will not show up in this table.
Thank you for your contribution. To review these changes, you can:
:bangbang: You can also preview changes [using Codespaces](https://github.com/github/docs-engineering/blob/main/docs/team-practices/use-a-codespace-to-review.md) or by [spinning up a local environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment). Please continue to [let us know](https://github.com/github/docs-team/discussions/4889) if you have trouble with the review server and use one of those options to preview your changes.
1. [Spin up a codespace](https://github.com/github/docs-team/blob/main/contributing-to-docs/use-a-codespace-to-review.md).
1. [Set up a local development environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment).
1. Message \`#docs-engineering\` on Slack for a staging server.
---
<details><summary>Table of review links</summary>
> [!WARNING]
> Our review server is experiencing latency issues.
The table shows the files in the `content` directory that were changed in this pull request. This helps you review your changes on the review server. Changes to the `data` directory are not included in this table. If you have issues with the review server, please [let us know](https://github.com/github/docs-team/discussions/4889) and use one of the other options to review your changes.
### Content directory changes
_You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request._
${{ steps.changes.outputs.changesTable }}
---
Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server
_This table is posted from the [${{ github.workflow }}](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/comment-content-changes-table.yml) workflow._
</details>
🤖 This comment is automatically generated.
edit-mode: replace
- name: Update comment on docs public
@@ -115,20 +123,29 @@ jobs:
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
body: |
<!-- MODIFIED_CONTENT_LINKING_COMMENT -->
## 👓 Previews for changed content
**This comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch.**
### 👓 How to review these changes
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the review server. Please note that changes to the `data` directory will not show up in this table.
Thank you for your contribution. To review these changes, you can:
:bangbang: You can also preview changes [using Codespaces](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace) or by [spinning up a local environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment). If you have trouble with the review server, use one of those options to preview your changes.
1. [Spin up a codespace](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace)
1. [Set up a local development environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment)
---
A Hubber will need to deploy your changes internally to review.
<details><summary>Table of review links</summary>
> [!WARNING]
> Our review server is experiencing latency issues.
The table shows the files in the `content` directory that were changed in this pull request. This helps you review your changes on the review server. Changes to the `data` directory are not included in this table.
### Content directory changes
_You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request._
${{ steps.changes.outputs.changesTable }}
---
Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server
_This table is posted from the [${{ github.workflow }}](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/comment-content-changes-table.yml) workflow._
</details>
🤖 This comment is automatically generated.
edit-mode: replace

View File

@@ -7,7 +7,7 @@ name: Keep caches warm
# actions cache is warmed up with data available during deployment
# actions. When you use actions/cache within a run on `main`
# what gets saved can be used by other pull requests. But it's
# also so that when we make preview or production deployments,
# also so that when we make production deployments,
# we can just rely on the cache to already be warmed up.
# **Why we have it**:
# A PR workflow that depends on caching can't reuse a