Skip to content

Commit c3336ee

Browse files
committed
Merge branch 'main' of github.com:OWASP/Nest into pr/sameersharmadev/2869
2 parents e8ca5aa + 2b6a99d commit c3336ee

27 files changed

Lines changed: 1088 additions & 1471 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ If you want to be assigned on any available issue, comment on it and wait for co
1515

1616
## Proposed change
1717

18-
<!-- Don't forget to link your PR to an existing issue if any.-->
18+
<!-- Don't forget to link your PR to an existing issue.-->
1919
Resolves #(put the issue number here)
2020

2121
<!-- Describe the big picture of your changes.-->
2222
Add the PR description here.
2323

2424
## Checklist
2525

26-
- [ ] I read and followed the [contributing guidelines](https://github.com/OWASP/Nest/blob/main/CONTRIBUTING.md)
27-
- [ ] I ran `make check-test` locally and all tests passed
26+
- [ ] **Required:** I read and followed the [contributing guidelines](https://github.com/OWASP/Nest/blob/main/CONTRIBUTING.md)
27+
- [ ] **Required:** I ran `make check-test` locally and all tests passed
2828
- [ ] I used AI for code, documentation, or tests in this PR

.github/workflows/run-code-ql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@cf1bb45a277cb3c205638b2cd5c984db1c46a412
34+
uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e
3535
with:
3636
languages: ${{ matrix.language }}
3737

@@ -55,6 +55,6 @@ jobs:
5555
run: pnpm install --frozen-lockfile
5656

5757
- name: Perform CodeQL analysis
58-
uses: github/codeql-action/analyze@cf1bb45a277cb3c205638b2cd5c984db1c46a412
58+
uses: github/codeql-action/analyze@1b168cd39490f61582a9beae412bb7057a6b2c4e
5959
with:
6060
category: /language:${{ matrix.language }}

backend/apps/slack/common/handlers/chapters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from django.conf import settings
6+
from django.template.defaultfilters import pluralize
67

78
from apps.common.constants import NL
89
from apps.common.utils import get_absolute_url, truncate
@@ -73,7 +74,7 @@ def get_blocks(
7374
location = chapter["idx_suggested_location"] or chapter["idx_country"]
7475
leaders = chapter.get("idx_leaders", [])
7576
leaders_text = (
76-
f"_Leader{'' if len(leaders) == 1 else 's'}: {', '.join(leaders)}_{NL}"
77+
f"_Leader{pluralize(len(leaders))}: {', '.join(leaders)}_{NL}"
7778
if leaders and presentation.include_metadata
7879
else ""
7980
)

backend/apps/slack/common/handlers/users.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def get_blocks(
7272
),
7373
]
7474

75-
blocks = []
7675
for idx, user in enumerate(users):
7776
user_name_raw = user.get("idx_name") or user.get("idx_login", "")
7877
user_name = truncate(escape(user_name_raw), presentation.name_truncation)

backend/data/nest.json.gz

3.33 MB
Binary file not shown.

backend/poetry.lock

Lines changed: 72 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/tests/apps/github/management/commands/github_sync_user_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MockPaginatedList:
1616

1717
def __init__(self, items):
1818
self._items = items
19-
self.totalCount = len(items)
19+
self.totalCount = len(items) # NOSONAR (for consistency with PyGithub).
2020

2121
def __iter__(self):
2222
"""Return an iterator for the items."""

backend/tests/apps/slack/common/handlers/users_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ def test_get_blocks_with_results(self, mocker, mock_users_data):
3737
"""Tests the happy path, ensuring user data is formatted correctly into blocks."""
3838
mocker.patch("apps.github.index.search.user.get_users", return_value=mock_users_data)
3939
blocks = get_blocks(search_query="john")
40-
assert len(blocks) > 1
41-
user_block_text = blocks[0]["text"]["text"]
40+
user_block_text = blocks[1]["text"]["text"]
41+
42+
assert "OWASP users that I found" in blocks[0]["text"]["text"]
4243
assert "1. <https://github.com/johndoe|*John Doe*>" in user_block_text
4344
assert "Company: OWASP" in user_block_text
4445
assert "Location: San Francisco" in user_block_text

cspell/custom-dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ geoloc
6666
geopy
6767
graphiql
6868
gunicorn
69+
hackathon
6970
heroui
7071
hsl
7172
igoat

cspell/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)