Skip to content

Commit 8302634

Browse files
authored
Merge pull request #36405 from github/repo-sync
Repo sync
2 parents 076a71c + f50b04b commit 8302634

File tree

5 files changed

+103
-230
lines changed

5 files changed

+103
-230
lines changed

.github/workflows/comment-code-changes.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/comment-content-changes-table.yml

Lines changed: 0 additions & 149 deletions
This file was deleted.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Review comment
2+
3+
# **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. it adds the staging review and live article links in a Content Directory Changes table in a comment.
4+
# **Why we have it**: To help Docs contributors understand how to review their changes.
5+
# **Who does it impact**: docs-internal and docs maintainers and contributors
6+
7+
on:
8+
# Required in lieu of `pull_request` so that the comment can be posted to PRs opened from a fork.
9+
pull_request_target:
10+
types:
11+
- opened
12+
- synchronize
13+
paths-ignore:
14+
- '.github/workflows/review-comment.yml'
15+
# For reviewing changes to this workflow
16+
pull_request:
17+
types:
18+
- opened
19+
- synchronize
20+
paths:
21+
- '.github/workflows/review-comment.yml'
22+
23+
permissions:
24+
contents: read
25+
pull-requests: write
26+
27+
# This allows a subsequently queued workflow run to interrupt previous runs
28+
concurrency:
29+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
30+
cancel-in-progress: true
31+
32+
jobs:
33+
review-comment:
34+
if: ${{ github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
35+
runs-on: ubuntu-latest
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
PR_NUMBER: ${{ github.event.pull_request.number }}
39+
steps:
40+
- name: check out repo content
41+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
42+
- uses: ./.github/actions/node-npm-setup
43+
# We're setting the URLs manually until we merge in-progress work. We can utilize review server and its helper functions in a later iteration.
44+
- name: Set APP_URL
45+
run: |
46+
if [[ "${{ github.repository }}" == "github/docs-internal" ]]; then
47+
echo "APP_URL=https://docs-review.github.com" >> $GITHUB_ENV
48+
elif [[ "${{ github.repository }}" == 'github/docs' ]]; then
49+
echo "APP_URL=https://os-docs-review.github.com" >> $GITHUB_ENV
50+
fi
51+
- name: Find code changes comment
52+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
53+
id: findComment
54+
with:
55+
issue-number: ${{ github.event.pull_request.number }}
56+
comment-author: 'github-actions[bot]'
57+
body-includes: '<!-- REVIEW_COMMENT -->'
58+
- name: Get changes table
59+
id: changes
60+
timeout-minutes: 30
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
REVIEW_SERVER_ACCESS_TOKEN: ${{ secrets.REVIEW_SERVER_ACCESS_TOKEN }}
64+
APP_URL: ${{ env.APP_URL }}
65+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
66+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
67+
# HEAD_BRANCH isn't necessary for the table comment, but lets us list the branch in the review server menu bar
68+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
69+
run: npm run content-changes-table-comment
70+
- name: Update comment
71+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
72+
with:
73+
comment-id: ${{ steps.findComment.outputs.comment-id }}
74+
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
75+
edit-mode: replace
76+
body: |
77+
<!-- REVIEW_COMMENT -->
78+
### How to review these changes 👓
79+
80+
Thank you for your contribution. To review these changes, choose one of the following options:
81+
82+
* [Spin up a codespace][codespace]
83+
* [Set up a local development environment][local]
84+
${{ github.repository == 'github/docs' && '' || '* Message `#docs-engineering` on Slack for a staging server.' }}
85+
86+
[codespace]: ${{ github.repository == 'github/docs' && 'https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace' || 'https://github.com/github/docs-team/blob/main/contributing-to-docs/use-a-codespace-to-review.md' }}
87+
[local]: https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment
88+
89+
${{ github.repository == 'github/docs' && 'A Hubber will need to deploy your changes internally to review.' || '' }}
90+
91+
<details><summary>Table of review links</summary>
92+
93+
⚠️ **Warning**: Our review server is experiencing latency issues.
94+
95+
${{ steps.changes.outputs.changesTable && '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.' || '' }}
96+
97+
${{ steps.changes.outputs.changesTable || '_This pull request contains code changes, so we will not generate a table of review links._' }}
98+
99+
${{ steps.changes.outputs.changesTable && 'Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server' || '' }}
100+
101+
</details>
102+
103+
🤖 This comment is [automatically generated](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/review-comment.yml).

content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ You can open {% data variables.product.prodname_copilot_chat_short %} from any p
6565

6666
Depending on the question you ask, and your enterprise and organization settings, {% data variables.product.prodname_copilot_short %} may respond using information based on the results of a Bing search. By using Bing search, {% data variables.product.prodname_copilot_short %} can answer a broad range of tech-related questions with up-to-date details based on information currently available on the internet. For information on how to enable or disable Bing search integration, see [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-copilot-policies-as-an-individual-subscriber#enabling-or-disabling-web-search-for-github-copilot-chat) and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise).
6767

68-
> [!NOTE] Bing search integration is currently in {% data variables.release-phases.public_preview %} and is subject to change.
6968
1. On any page on {% data variables.product.github %}, click the **{% octicon "copilot" aria-hidden="true" %}** {% data variables.product.prodname_copilot %} icon at the bottom right of the page.
7069

7170
The {% data variables.product.prodname_copilot_chat %} panel is displayed. To resize the panel, click and drag the top or left edge.

data/reusables/rai/copilot/copilot-chat-ide-leveraging-web-search.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
### Leveraging a web search to answer a question
22

3-
> [!NOTE]
4-
> Bing search integration in {% data variables.product.prodname_copilot_chat_short %} is currently in {% data variables.release-phases.public_preview %} and is subject to change.
5-
63
When you use the `@github` chat participant, {% data variables.product.prodname_copilot_chat %} can use a Bing search to help answer your question if this has been enabled by your administrator.
74

85
Your {% data variables.product.prodname_enterprise %} administrator can enable Bing for your whole enterprise, or can delegate this decision to the organizational administrator. For more information, see [AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-copilot-in-your-enterprise).

0 commit comments

Comments
 (0)