You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/03/04 16:28:05 UTC

[airflow] branch master updated: Remove redundant step in CodeQL GitHub Actions step (#14600)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 4efd584  Remove redundant step in CodeQL GitHub Actions step (#14600)
4efd584 is described below

commit 4efd5845eb89c9e50f2668c108ed33ef0849fa0d
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Thu Mar 4 16:27:55 2021 +0000

    Remove redundant step in CodeQL GitHub Actions step (#14600)
    
    From https://github.com/apache/airflow/runs/2031451066#step:4:9
    
    Warning: 1 issue was detected with this workflow: git checkout HEAD^2 is no longer necessary.
    Please remove this step as Code Scanning recommends analyzing the merge commit for best results.
    
    I also double-check it with https://github.com/github/codeql-action
---
 .github/workflows/codeql-analysis.yml | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 8bdd809..c39aa68 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -66,22 +66,11 @@ jobs:
       - name: Checkout repository
         uses: actions/checkout@v2
         with:
-          # We must fetch at least the immediate parents so that if this is
-          # a pull request then we can checkout the head.
-          fetch-depth: 2
           persist-credentials: false
         if: |
           matrix.language == 'python' && needs.selective-checks.outputs.needs-python-scans == 'true' ||
           matrix.language == 'javascript' && needs.selective-checks.outputs.needs-javascript-scans == 'true'
 
-      # If this run was triggered by a pull request event, then checkout
-      # the head of the pull request instead of the merge commit.
-      - run: git checkout HEAD^2
-        if: |
-          github.event_name == 'pull_request' &&
-          (matrix.language == 'python' && needs.selective-checks.outputs.needs-python-scans == 'true' ||
-          matrix.language == 'javascript' && needs.selective-checks.outputs.needs-javascript-scans == 'true')
-
       # Initializes the CodeQL tools for scanning.
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v1