Skip to content

Commit 368dc6f

Browse files
authored
Make very trivial tweaks to some workflows (#906)
This removes an unhelpful debug setting in the cirq compat workflow and makes minor edits to comments and names elsewhere in order to bring this in line with our template versions of these workflows.
1 parent beacb4f commit 368dc6f

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

.github/workflows/cirq_compatibility.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 'Nightly Cirq compatibility test'
15+
name: 'Cirq dev compatibility test'
1616
run-name: Regularly test code against latest Cirq dev release
1717

1818
on:
@@ -64,6 +64,5 @@ jobs:
6464
6565
- name: Run Python tests
6666
env:
67-
MAKEFLAGS: ${{inputs.debug && '--debug=b' || '' }}
6867
PYTEST_ADDOPTS: ${{inputs.debug && '-v' || '' }}
6968
run: make -j run-py-tests

.github/workflows/osv-scanner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: OSV vulnerabilities scan
15+
name: OSV scan
1616
run-name: Run open-source vulnerabilities (OSV) scanner
1717

1818
# The OSV scanner is a dependency vulnerability scanner that identifies known

.github/workflows/pr-labeler.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16-
# Label PRs with labels such as size. Note that this workflow is designed not to
17-
# fail if labeling actions encounter errors; instead, it writes error messages
18-
# as annotations on the workflow's run summary page. If labels don't seem to be
19-
# getting applied, check the run summary page for errors.
20-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21-
22-
name: Label pull requests
15+
name: Pull request labeler
2316
run-name: >-
2417
Label pull request ${{github.event.pull_request.number}} by ${{github.actor}}
2518
19+
# This workflow is designed NOT to fail if labeling actions encounter errors;
20+
# instead, it notes errors as annotations on the workflow's run summary page. If
21+
# labels don't seem to be getting applied, check there for errors.
22+
2623
on:
2724
# Note: do not copy-paste this workflow with `pull_request_target` left as-is.
2825
# Its use here is a special case where security implications are understood.
@@ -32,17 +29,19 @@ on:
3229
- opened
3330
- synchronize
3431

32+
# Allow manual invocation.
3533
workflow_dispatch:
3634
inputs:
3735
pr-number:
3836
description: 'The PR number of the PR to label:'
3937
type: string
4038
required: true
4139
debug:
42-
description: 'Run with debugging turned on'
40+
description: 'Run with debugging options'
4341
type: boolean
4442
default: true
4543

44+
# Declare default workflow permissions as read only.
4645
permissions: read-all
4746

4847
jobs:
@@ -56,9 +55,9 @@ jobs:
5655
issues: write
5756
pull-requests: write
5857
env:
58+
# Environment variable PR_NUMBER is needed by size-labeler.sh.
5959
PR_NUMBER: ${{inputs.pr-number || github.event.pull_request.number}}
60-
# The next var is used by Bash. We add 'xtrace' to the options if this run
61-
# is a workflow_dispatch invocation and the user set the 'trace' option.
60+
# Add xtrace to SHELLOPTS for all Bash scripts when doing debug runs.
6261
SHELLOPTS: ${{inputs.debug && 'xtrace' || '' }}
6362
steps:
6463
- name: Check out a copy of the git repository
@@ -68,7 +67,6 @@ jobs:
6867
./dev_tools/ci/size-labeler.sh
6968
7069
- name: Label the PR with a size label
71-
id: label
7270
continue-on-error: true
7371
env:
7472
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)