From 521636dd7450f6564865b72f7628225d7db48c40 Mon Sep 17 00:00:00 2001 From: Hector Alfaro Date: Thu, 6 Feb 2025 11:59:45 -0500 Subject: [PATCH] Add Codespaces and local options to content changes table (#54285) --- .github/workflows/comment-code-changes.yml | 2 +- .../comment-content-changes-table.yml | 32 +++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/comment-code-changes.yml b/.github/workflows/comment-code-changes.yml index addac2ed78..49d5a4b7ea 100644 --- a/.github/workflows/comment-code-changes.yml +++ b/.github/workflows/comment-code-changes.yml @@ -62,7 +62,7 @@ jobs: 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. Message on Slack in `#docs-engineering` for a staging server. + 1. Message \`#docs-engineering\` on Slack for a staging server. Thank you for your contribution!" fi diff --git a/.github/workflows/comment-content-changes-table.yml b/.github/workflows/comment-content-changes-table.yml index e558af9c5c..f2e582b29a 100644 --- a/.github/workflows/comment-content-changes-table.yml +++ b/.github/workflows/comment-content-changes-table.yml @@ -81,8 +81,8 @@ jobs: comment-author: 'github-actions[bot]' body-includes: '' - - name: Update comment - if: ${{ steps.changes.outputs.changesTable != '' }} + - name: Update comment on docs-internal + if: ${{github.repository == 'github/docs-internal' && steps.changes.outputs.changesTable != '' }} uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 with: comment-id: ${{ steps.findComment.outputs.comment-id }} @@ -94,6 +94,34 @@ jobs: 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. + :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. + + --- + + ### 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._ + edit-mode: replace + + - name: Update comment on docs public + if: ${{github.repository == 'github/docs' && steps.changes.outputs.changesTable != '' }} + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 + with: + comment-id: ${{ steps.findComment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }} + body: | + + ## 👓 Previews for changed content + **This comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch.** + + 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. + + :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. + --- ### Content directory changes