Skip to content

Commit 04f1dbc

Browse files
committed
Removing check-label job completely to see if that's causing issues
1 parent c46b1b3 commit 04f1dbc

File tree

1 file changed

+23
-74
lines changed

1 file changed

+23
-74
lines changed

.github/workflows/pr.yml

+23-74
Original file line numberDiff line numberDiff line change
@@ -34,131 +34,80 @@ jobs:
3434
run: |
3535
echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
3636
37-
check-label:
38-
needs: [changes]
39-
runs-on: buildjet-2vcpu-ubuntu-2204
40-
name: Check for E2E label
41-
outputs:
42-
run-e2e: ${{ steps.check-if-pr-has-label.outputs.run-e2e == 'true' && (github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'ready-for-e2e')) }}
43-
run-jobs: ${{ github.event.action != 'labeled' }}
44-
steps:
45-
- name: Check if PR exists with ready-for-e2e label for this SHA
46-
id: check-if-pr-has-label
47-
uses: actions/github-script@v7
48-
with:
49-
script: |
50-
let labels = [];
51-
52-
if (context.payload.pull_request) {
53-
labels = context.payload.pull_request.labels;
54-
} else {
55-
try {
56-
const sha = '${{ needs.changes.outputs.commit-sha }}';
57-
console.log('sha', sha);
58-
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
59-
owner: context.repo.owner,
60-
repo: context.repo.repo,
61-
commit_sha: sha
62-
});
63-
64-
if (prs.length === 0) {
65-
core.setOutput('run-e2e', false);
66-
console.log(`No pull requests found for commit SHA ${sha}`);
67-
return;
68-
}
69-
70-
const pr = prs[0];
71-
console.log(`PR number: ${pr.number}`);
72-
console.log(`PR title: ${pr.title}`);
73-
console.log(`PR state: ${pr.state}`);
74-
console.log(`PR URL: ${pr.html_url}`);
75-
76-
labels = pr.labels;
77-
}
78-
catch (e) {
79-
core.setOutput('run-e2e', false);
80-
console.log(e);
81-
}
82-
}
83-
84-
const labelFound = labels.map(l => l.name).includes('ready-for-e2e');
85-
console.log('Found the label?', labelFound);
86-
core.setOutput('run-e2e', labelFound);
87-
8837
type-check:
8938
name: Type check
90-
needs: [changes, check-label]
91-
if: ${{ needs.check-label.outputs.run-jobs == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
39+
needs: [changes]
40+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
9241
uses: ./.github/workflows/check-types.yml
9342
secrets: inherit
9443

9544
lint:
9645
name: Linters
97-
needs: [changes, check-label]
98-
if: ${{ needs.check-label.outputs.run-jobs == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
46+
needs: [changes]
47+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
9948
uses: ./.github/workflows/lint.yml
10049
secrets: inherit
10150

10251
unit-test:
10352
name: Tests
104-
needs: [changes, check-label]
105-
if: ${{ needs.check-label.outputs.run-jobs == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
53+
needs: [changes]
54+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
10655
uses: ./.github/workflows/unit-tests.yml
10756
secrets: inherit
10857

10958
integration-test:
11059
name: Tests
111-
needs: [changes, check-label]
112-
if: ${{ needs.check-label.outputs.run-jobs == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
60+
needs: [changes]
61+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
11362
uses: ./.github/workflows/integration-tests.yml
11463
secrets: inherit
11564

11665
build-api-v1:
11766
name: Production builds
118-
needs: [changes, check-label]
119-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
67+
needs: [changes]
68+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
12069
uses: ./.github/workflows/api-v1-production-build.yml
12170
secrets: inherit
12271

12372
build-api-v2:
12473
name: Production builds
125-
needs: [changes, check-label]
126-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
74+
needs: [changes]
75+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
12776
uses: ./.github/workflows/api-v2-production-build.yml
12877
secrets: inherit
12978

13079
build:
13180
name: Production builds
132-
needs: [changes, check-label]
133-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
81+
needs: [changes]
82+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
13483
uses: ./.github/workflows/production-build-without-database.yml
13584
secrets: inherit
13685

13786
e2e:
13887
name: Tests
139-
needs: [changes, lint, check-label, build, build-api-v1, build-api-v2]
140-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
88+
needs: [changes, lint, build, build-api-v1, build-api-v2]
89+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
14190
uses: ./.github/workflows/e2e.yml
14291
secrets: inherit
14392

14493
e2e-app-store:
14594
name: Tests
146-
needs: [changes, lint, check-label, build, build-api-v1, build-api-v2]
147-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
95+
needs: [changes, lint, build, build-api-v1, build-api-v2]
96+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
14897
uses: ./.github/workflows/e2e-app-store.yml
14998
secrets: inherit
15099

151100
e2e-embed:
152101
name: Tests
153-
needs: [changes, lint, check-label, build, build-api-v1, build-api-v2]
154-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
102+
needs: [changes, lint, build, build-api-v1, build-api-v2]
103+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
155104
uses: ./.github/workflows/e2e-embed.yml
156105
secrets: inherit
157106

158107
e2e-embed-react:
159108
name: Tests
160-
needs: [changes, lint, check-label, build, build-api-v1, build-api-v2]
161-
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
109+
needs: [changes, lint, build, build-api-v1, build-api-v2]
110+
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
162111
uses: ./.github/workflows/e2e-embed-react.yml
163112
secrets: inherit
164113

@@ -169,7 +118,7 @@ jobs:
169118
secrets: inherit
170119

171120
required:
172-
needs: [changes, lint, type-check, unit-test, integration-test, check-label, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
121+
needs: [changes, lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
173122
if: always()
174123
runs-on: buildjet-2vcpu-ubuntu-2204
175124
steps:

0 commit comments

Comments
 (0)