Skip to content

Commit 6487712

Browse files
authored
[DSP, already shipped] Code scanning: Small update for change from head to merge commit for attribution (#16169)
* Small update for change from head to merge commit for attribution * Simplify the sentence about when codescan is run against PRs Whether it does attribution using a comparison of the HEAD commit or a merge into a temporary copy of the default branch is too much information here.
1 parent a4bc1a6 commit 6487712

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ By default, the {% data variables.product.prodname_codeql_workflow %} uses the `
4848

4949
#### Scanning pull requests
5050

51-
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on the `HEAD` commit of a pull request against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
51+
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
5252

5353
For more information about the `pull_request` event, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags)."
5454

@@ -150,8 +150,6 @@ jobs:
150150
steps:
151151
- name: Checkout repository
152152
uses: actions/checkout@v2
153-
with:
154-
fetch-depth: 2
155153
- name: Set up Python
156154
uses: actions/setup-python@v2
157155
with:
@@ -165,8 +163,6 @@ jobs:
165163
# Set the `CODEQL-PYTHON` environment variable to the Python executable
166164
# that includes the dependencies
167165
echo "::set-env name=CODEQL_PYTHON::$(which python)"
168-
- run: git checkout HEAD^2
169-
if: ${{ github.event_name == 'pull_request' }}
170166
- name: Initialize CodeQL
171167
uses: github/codeql-action/init@v1
172168
with:

0 commit comments

Comments
 (0)