Skip to content

Commit 606c3b2

Browse files
committed
add pull request support to GHA workflows
1 parent c05ea22 commit 606c3b2

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

.github/workflows/codeql-analysis.yml

+35-35
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
# The branches below must be a subset of the branches above
88
branches: [master]
99
schedule:
10-
- cron: '0 10 * * 0'
10+
- cron: "0 10 * * 0"
1111

1212
jobs:
1313
analyze:
@@ -19,48 +19,48 @@ jobs:
1919
matrix:
2020
# Override automatic language detection by changing the below list
2121
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22-
language: ['python']
22+
language: ["python"]
2323
# Learn more...
2424
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
2525

2626
steps:
27-
- name: Checkout repository
28-
uses: actions/checkout@v2
29-
with:
30-
# We must fetch at least the immediate parents so that if this is
31-
# a pull request then we can checkout the head.
32-
fetch-depth: 2
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
with:
30+
# We must fetch at least the immediate parents so that if this is
31+
# a pull request then we can checkout the head.
32+
fetch-depth: 2
3333

34-
# If this run was triggered by a pull request event, then checkout
35-
# the head of the pull request instead of the merge commit.
36-
- run: git checkout HEAD^2
37-
if: ${{ github.event_name == 'pull_request' }}
34+
# If this run was triggered by a pull request event, then checkout
35+
# the head of the pull request instead of the merge commit.
36+
- run: git checkout HEAD^2
37+
if: ${{ github.event_name == 'pull_request' }}
3838

39-
# Initializes the CodeQL tools for scanning.
40-
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v1
42-
with:
43-
languages: ${{ matrix.language }}
44-
# If you wish to specify custom queries, you can do so here or in a config file.
45-
# By default, queries listed here will override any specified in a config file.
46-
# Prefix the list here with "+" to use these queries and those in the config file.
47-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
39+
# Initializes the CodeQL tools for scanning.
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v1
42+
with:
43+
languages: ${{ matrix.language }}
44+
# If you wish to specify custom queries, you can do so here or in a config file.
45+
# By default, queries listed here will override any specified in a config file.
46+
# Prefix the list here with "+" to use these queries and those in the config file.
47+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4848

49-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50-
# If this step fails, then you should remove it and run the build manually (see below)
51-
- name: Autobuild
52-
uses: github/codeql-action/autobuild@v1
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50+
# If this step fails, then you should remove it and run the build manually (see below)
51+
- name: Autobuild
52+
uses: github/codeql-action/autobuild@v1
5353

54-
# ℹ️ Command-line programs to run using the OS shell.
55-
# 📚 https://git.io/JvXDl
54+
# ℹ️ Command-line programs to run using the OS shell.
55+
# 📚 https://git.io/JvXDl
5656

57-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
58-
# and modify them (or add more) to build your code if your project
59-
# uses a compiled language
57+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
58+
# and modify them (or add more) to build your code if your project
59+
# uses a compiled language
6060

61-
#- run: |
62-
# make bootstrap
63-
# make release
61+
#- run: |
62+
# make bootstrap
63+
# make release
6464

65-
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@v1
65+
- name: Perform CodeQL Analysis
66+
uses: github/codeql-action/analyze@v1

.github/workflows/py-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Python CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.github/workflows/py-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Coverage
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.github/workflows/py-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Python Lints
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.github/workflows/py-typecheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Python Type Checks
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

0 commit comments

Comments
 (0)