Skip to content

Commit 2463b8a

Browse files
authored
Merge branch 'main' into all-contributors/add-Protectator
2 parents a941bda + 6edcbb6 commit 2463b8a

File tree

6 files changed

+68
-6
lines changed

6 files changed

+68
-6
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33
# https://help.github.com/articles/about-codeowners
44
# https://git-scm.com/docs/gitignore
55

6-
/translations/ @github/docs-localization @github-actions
6+
# Engineering
77
*.js @github/docs-engineering
88
/.github/ @github/docs-engineering
99
/script/ @github/docs-engineering
1010
app.json @github/docs-engineering
11-
crowdin.yml @github/docs-engineering
1211
Dockerfile @github/docs-engineering
1312
package-lock.json @github/docs-engineering
1413
package.json @github/docs-engineering
1514

15+
# Localization
16+
/.github/workflows/crowdin.yml @github/docs-localization
17+
/crowdin*.yml @github/docs-engineering @github/docs-localization
18+
/translations/ @github/docs-engineering @github/docs-localization @github-actions
19+
20+
# Site Policy
1621
/content/github/site-policy/ @github/site-policy-admins
1722

1823
# Make sure that Octokit maintainers get notified about changes

.github/workflows/crowdin.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
name: Crowdin Sync
44

55
on:
6+
workflow_dispatch:
67
push:
78
branches:
89
- main
910

1011
jobs:
1112
sync_with_crowdin:
1213
name: Sync with Crowdin
14+
if: github.repository == 'github/docs-internal'
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Checkout
@@ -18,7 +20,7 @@ jobs:
1820
- name: Sync
1921
uses: crowdin/github-action@1.0.10
2022
with:
21-
upload_translations: true
23+
upload_translations: false
2224
download_translations: true
2325
create_pull_request: true
2426

@@ -47,4 +49,4 @@ jobs:
4749
# This token was created by logging into Crowdin with the octoglot user
4850
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
4951

50-
52+

.github/workflows/merged-notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
on:
2-
pull_request:
2+
pull_request_target:
33
types: ['closed']
44

55
jobs:

content/github/collaborating-with-issues-and-pull-requests/about-comparing-branches-in-pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ A two-dot diff compares two Git committish references, such as SHAs or OIDs (Obj
5454

5555
If you want to simulate a two-dot diff in a pull request and see a comparison between the most recent versions of each branch, you can merge the base branch into your topic branch, which updates the last common ancestor between your branches.
5656

57-
For more information about Git commands to compare changes, see "[Git diff options ](https://git-scm.com/docs/git-diff#git-diff-emgitdiffemltoptionsgtltcommitgtltcommitgt--ltpathgt82308203)" from the _Pro Git_ book site.
57+
For more information about Git commands to compare changes, see "[Git diff options](https://git-scm.com/docs/git-diff#git-diff-emgitdiffemltoptionsgtltcommitgtltcommitgt--ltpathgt82308203)" from the _Pro Git_ book site.
5858

5959
### Reasons diffs will not display
6060
- You've exceeded the total limit of files or certain file types. For more information, see "[Limits for viewing content and diffs in a repository](/articles/limits-for-viewing-content-and-diffs-in-a-repository/#diff-limits)."

content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,52 @@ If your workflow does not contain a matrix called `language`, then {% data varia
130130
with:
131131
languages: cpp, csharp, python
132132
```
133+
{% if currentVersion == "free-pro-team@latest" %}
134+
### Analyzing Python dependencies
135+
136+
For GitHub-hosted runners that use Linux only, the {% data variables.product.prodname_codeql_workflow %} will try to auto-install Python dependencies to give more results for the CodeQL analysis. You can control this behavior by specifying the `setup-python-dependencies` parameter for the action called by the "Initialize CodeQL" step. By default, this parameter is set to `true`:
137+
138+
- If the repository contains code written in Python, the "Initialize CodeQL" step installs the necessary dependencies on the GitHub-hosted runner. If the auto-install succeeds, the action also sets the environment variable `CODEQL_PYTHON` to the Python executable file that includes the dependencies.
139+
140+
- If the repository doesn't have any Python dependencies, or the dependencies are specified in an unexpected way, you'll get a warning and the action will continue with the remaining jobs. The action can run successfully even when there are problems interpreting dependencies, but the results may be incomplete.
141+
142+
Alternatively, you can install Python dependencies manually on any operating system. You will need to add `setup-python-dependencies` and set it to `false`, as well as set `CODEQL_PYTHON` to the Python executable that includes the dependencies, as shown in this workflow extract:
143+
144+
```yaml
145+
jobs:
146+
CodeQL-Build:
147+
148+
runs-on: ubuntu-latest
149+
150+
steps:
151+
- name: Checkout repository
152+
uses: actions/checkout@v2
153+
with:
154+
fetch-depth: 2
155+
- name: Set up Python
156+
uses: actions/setup-python@v2
157+
with:
158+
python-version: '3.x'
159+
- name: Install dependencies
160+
run: |
161+
python -m pip install --upgrade pip
162+
if [ -f requirements.txt ];
163+
then pip install -r requirements.txt;
164+
fi
165+
# Set the `CODEQL-PYTHON` environment variable to the Python executable
166+
# that includes the dependencies
167+
echo "::set-env name=CODEQL_PYTHON::$(which python)"
168+
- run: git checkout HEAD^2
169+
if: ${{ github.event_name == 'pull_request' }}
170+
- name: Initialize CodeQL
171+
uses: github/codeql-action/init@v1
172+
with:
173+
languages: python
174+
# Override the default behavior so that the action doesn't attempt
175+
# to auto-install Python dependencies
176+
setup-python-dependencies: false
177+
```
178+
{% endif %}
133179
134180
### Running additional queries
135181

content/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-the-codeql-workflow.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,12 @@ If you split your analysis into multiple workflows as described above, we still
114114
#### Run only during a `schedule` event
115115

116116
If your analysis is still too slow to be run during `push` or `pull_request` events, then you may want to only trigger analysis on the `schedule` event. For more information, see "[Events](/actions/learn-github-actions/introduction-to-github-actions#events)."
117+
118+
{% if currentVersion == "free-pro-team@latest" %}
119+
### Results differ between analysis platforms
120+
121+
If you are analyzing code written in Python, you may see different results depending on whether you run the {% data variables.product.prodname_codeql_workflow %} on Linux, macOS, or Windows.
122+
123+
On GitHub-hosted runners that use Linux, the {% data variables.product.prodname_codeql_workflow %} tries to install and analyze Python dependencies, which could lead to more results. To disable the auto-install, add `setup-python-dependencies: false` to the "Initialize CodeQL" step of the workflow. For more information about configuring the analysis of Python dependencies, see "[Analyzing Python dependencies](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#analyzing-python-dependencies)."
124+
125+
{% endif %}

0 commit comments

Comments
 (0)