Skip to content

Commit

Permalink
chore(ci): remove pull_request_target (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch authored Jul 19, 2024
1 parent 59f438c commit 79b5c90
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ on:
- "*.md"
- ".kokoro/**"
- ".github/**"
pull_request_target:
types: [labeled]
paths-ignore:
- "*.md"
- ".kokoro/**"
- ".github/**"

jobs:
lint:
Expand All @@ -34,33 +28,10 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"

steps:
- name: Remove PR label
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'tests: run',
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number
});
} catch (e) {
console.log('Failed to remove label. Another job may have already removed it!');
}
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
Expand Down

0 comments on commit 79b5c90

Please sign in to comment.