Skip to content

Commit a9c60a4

Browse files
committed
fix: Test workflow changes on from pull_request_target to pull_request
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
1 parent 290bb5c commit a9c60a4

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/java_pr.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if:
1414
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
1515
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
16-
github.repository == 'feast-dev/feast'
16+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
@@ -30,7 +30,7 @@ jobs:
3030
if:
3131
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
3232
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
33-
github.repository == 'feast-dev/feast'
33+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
3434
runs-on: ubuntu-latest
3535
needs: lint-java
3636
steps:
@@ -70,7 +70,7 @@ jobs:
7070
if:
7171
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
7272
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
73-
github.repository == 'feast-dev/feast'
73+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
7474
runs-on: ubuntu-latest
7575
strategy:
7676
matrix:
@@ -105,18 +105,17 @@ jobs:
105105
if:
106106
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
107107
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
108-
github.repository == 'feast-dev/feast'
108+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
109109
runs-on: ubuntu-latest
110110
needs: unit-test-java
111111
env:
112112
PYTHON: 3.11
113113
steps:
114114
- uses: actions/checkout@v4
115115
with:
116-
# pull_request runs the workflow in the context of the base repo
117-
# as such actions/checkout needs to be explicit configured to retrieve
118-
# code from the PR.
119-
ref: refs/pull/${{ github.event.pull_request.number }}/merge
116+
repository: ${{ github.event.repository.full_name }} # Uses the full repository name
117+
ref: ${{ github.ref }} # Uses the ref from the event
118+
token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided token
120119
submodules: recursive
121120
- name: Set up JDK 11
122121
uses: actions/setup-java@v1

.github/workflows/lint_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
jobs:
1515
validate-title:
1616
if:
17-
github.repository == 'feast-dev/feast'
17+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
1818
name: Validate PR title
1919
runs-on: ubuntu-latest
2020
steps:

.github/workflows/pr_integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if:
1919
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
2020
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
21-
github.repository == 'feast-dev/feast'
21+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
2222
runs-on: ${{ matrix.os }}
2323
strategy:
2424
fail-fast: false

.github/workflows/pr_local_integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if:
1515
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
1616
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
17-
github.repository == 'feast-dev/feast'
17+
github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
fail-fast: false

0 commit comments

Comments
 (0)