-
Notifications
You must be signed in to change notification settings - Fork 3
Update String-Ids-toObjectIds #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: String-Ids-to-ObjectIds
Are you sure you want to change the base?
Changes from all commits
7913a68
230544c
5707745
ede1e6c
d8a099e
fae8cec
d1d53f1
6c3a195
cad2790
44b0426
044c48a
fcbc481
1c47667
5356e6a
9a87352
349c305
7c0c568
674e1c7
184c577
578e404
1d6a49f
67ea9b9
6d311e4
02447c3
64f6a66
43dffca
7bf66b9
5198097
f53844e
a222904
7898a8f
766450d
c153ece
aa1a0af
1691b78
1a34bce
ae8a167
a761475
b66169e
5aebd52
aa4cf8c
a488833
e510aec
bfadfff
59541de
513082d
8b3bd8b
50d8704
76d246a
18d7a1e
0403029
c4410ed
3d612e6
2b10cb1
5b57044
1057545
76402d2
008acf3
6a38380
1e023b3
cfa49d1
6e7f841
f690bf6
9234dd2
bab7bae
3122e3b
eae7332
ca22b80
ee987e3
3ccbbe1
fab5527
e506998
e481a18
a5953b9
3a42155
a571a31
cdb45f2
65e6b13
a78dc1f
fe77851
e3924a9
36389f9
51c018d
e2bf7e6
71f1ea5
8754455
bfcd395
53f7fdf
8dc29ae
a73b9f9
a3d1f38
46fb7da
418ff47
be6bf80
7e7324d
0812bce
3f845bf
bcac56f
563cc8e
74dbe65
a9dc744
e17052e
b086a3d
7e35f6d
9808034
5526712
5aeba61
e79b2e6
e1660bb
cc3fa30
b1cfdb7
c062c78
3cecea6
83b438a
0baab92
9dbd7af
a6ae069
860d331
58946df
7c4a9aa
fa719f0
7995a3f
6bbd1f8
cd9677b
e96aab5
9ae0c43
132d65b
32cad93
fdbf54c
140a5a2
721ffb5
d2e624c
9793ab0
fc529b3
776abe8
d554ff1
c4c0406
80f0a99
4d6f011
c9fd083
5c9390a
4129384
cb32644
3f4984d
79abaaa
ff7078d
abd0c73
ccc440d
2bd82bb
2191041
286dcc9
d3be09a
c4ac12c
a1f2554
94a9723
b38333e
a5cdb0c
5dbcdc1
03091c6
9807dac
58210c3
e2fdf1c
788cd9f
d49bbdb
b87ad00
2b9840a
73a7c6d
08240d2
80c792d
801e659
e6d1bae
cee908f
a000f4c
d8a48dc
ed2ae4e
c4f9f52
944e6bb
28b3861
83367fa
13e303e
44f34ae
b52f7be
c3fa9c1
611fc48
dfeb5b9
1968a99
aa05b89
8ae7998
8fc11da
81b7608
94d508b
b74b0d3
75715b2
3f79507
f7efa2d
615915c
8914767
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,22 @@ | ||
| NEXT_PUBLIC_API_URL=http://localhost:3000/api | ||
| NEXTAUTH_URL=http://localhost:3000/api/ | ||
| NEXTAUTH_SECRET=testsecret | ||
|
|
||
| NEXT_PUBLIC_API_URL=/api/ | ||
|
|
||
| DEVELOPER_EMAILS=["test@gmail.com"] | ||
|
|
||
| TOA_URL=https://example.com | ||
| TOA_APP_ID=123 | ||
| TOA_KEY=456 | ||
|
|
||
| DEFAULT_IMAGE=https://example.com/default.jpg | ||
| API_URL=/api/ | ||
| API_KEY=gearboxiscool | ||
|
|
||
| DEFAULT_IMAGE=https://example.com/default.jpg | ||
|
|
||
| BASE_URL_FOR_PLAYWRIGHT=http://localhost:3000/ | ||
| ENABLE_TEST_SIGNIN_ROUTE=true | ||
| FALLBACK_MONGODB_URI=mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.10 | ||
| ENV_FILE=.env.test | ||
|
|
||
| DB=playwright_tests |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||||||||||||||||||||||
| name: Playwright Tests | ||||||||||||||||||||||||||
| on: [workflow_dispatch, workflow_call] | ||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| e2e_tests: | ||||||||||||||||||||||||||
| timeout-minutes: 60 | ||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||
| # Make sure to require each shard in GitHub! | ||||||||||||||||||||||||||
| shardIndex: [1, 2, 3, 4] | ||||||||||||||||||||||||||
| shardTotal: [4] | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - uses: actions/setup-node@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| node-version: lts/* | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install Playwright browsers | ||||||||||||||||||||||||||
| run: npx playwright install --with-deps | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Start MongoDB | ||||||||||||||||||||||||||
| uses: supercharge/mongodb-github-action@1.12.0 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| mongodb-version: "8.0" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Run Playwright tests | ||||||||||||||||||||||||||
| run: npx cross-env NODE_ENV=test playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Upload blob report to GitHub Actions Artifacts | ||||||||||||||||||||||||||
| if: ${{ !cancelled() }} | ||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| name: blob-report-${{ matrix.shardIndex }} | ||||||||||||||||||||||||||
| path: blob-report | ||||||||||||||||||||||||||
| retention-days: 1 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| merge_reports: | ||||||||||||||||||||||||||
| # Merge reports after playwright-tests, even if some shards have failed | ||||||||||||||||||||||||||
| if: ${{ !cancelled() }} | ||||||||||||||||||||||||||
| needs: [e2e_tests] | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||
| - uses: actions/setup-node@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| node-version: lts/* | ||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Download blob reports from GitHub Actions Artifacts | ||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| path: all-blob-reports | ||||||||||||||||||||||||||
| pattern: blob-report-* | ||||||||||||||||||||||||||
| merge-multiple: true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Merge into HTML Report | ||||||||||||||||||||||||||
| run: npx playwright merge-reports --reporter html ./all-blob-reports | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Upload HTML report | ||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| name: html-report--attempt-${{ github.run_attempt }} | ||||||||||||||||||||||||||
| path: playwright-report | ||||||||||||||||||||||||||
| retention-days: 14 | ||||||||||||||||||||||||||
|
Comment on lines
+44
to
+71
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 4 days ago In general, the fix is to explicitly declare a The best minimal fix without changing functionality is to add a top-level Specifically: edit permissions:
contents: readbetween the existing
Suggested changeset
1
.github/workflows/e2e_test.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 4 days ago
In general, this issue is fixed by explicitly setting the
permissionsfor the GITHUB_TOKEN at the workflow or job level, instead of relying on organization/repository defaults. For test workflows like this one,contents: readis typically sufficient, as the workflow only checks out code and uses artifacts, and does not need to write to the repository, issues, or pull requests.The best fix here, without changing existing functionality, is to add a
permissionsblock at the top level of.github/workflows/e2e_test.yml, just belowname:(or immediately afteron:). This root-levelpermissionsconfiguration will apply to all jobs (e2e_testsandmerge_reports) since neither defines its own permissions. The minimal safe starting point per CodeQL’s suggestion iscontents: read, which allowsactions/checkout@v4to function while avoiding unnecessary write access. No additional imports or methods are needed; only the YAML configuration is updated.Concretely: in
.github/workflows/e2e_test.yml, insert:near the top of the file (e.g., after line 2), keeping indentation aligned with
name:andon:keys.