python: Use a context manager for opening files (SIM115) to solve some ResourceWarnings #2350
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Validate Titles | |
on: | |
pull_request_target: | |
types: | |
- edited | |
# The following types are default for pull_request_target | |
- opened | |
- synchronize | |
- reopened | |
permissions: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
validate-titles: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout base repository (doesn't include the PR changes) | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Call PR title validation function | |
run: python utils/generate_release_notes.py check "${PR_TITLE}" "" "" | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} |