Skip to content

playwright bot#14

Closed
JacobCoffee wants to merge 64 commits into
mainfrom
playwright-but-rebased
Closed

playwright bot#14
JacobCoffee wants to merge 64 commits into
mainfrom
playwright-but-rebased

Conversation

@JacobCoffee

@JacobCoffee JacobCoffee commented Nov 20, 2025

Copy link
Copy Markdown
Member

Base playwright:

  • read comments
  • post comments
  • process commands (@ do-thing)
  • keeps track of which commands it has oprocessed via state file/gha cache

Closes #9, Closes #3, Closes #4, Closes #7

@JacobCoffee

Copy link
Copy Markdown
Member Author

i think i have addressed or fix all comments, please recheck when you get time

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had two comments, otherwise LGTM.

Comment thread src/psrt_ghsa_bot/polyfills/comments/get_comments.py Outdated
Comment thread src/psrt_ghsa_bot/polyfills/comments/get_comments.py Outdated
When timestamp extraction fails, raise ValueError instead of silently
returning datetime.now(). This ensures scraping failures are surfaced
rather than producing potentially incorrect data.

Addresses review feedback from @sethmlarson.

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the non-demo non-test things, and it looks really great! Some little comments, mostly nits:-)

git config user.email "bot@python.org"
git add state.json
git diff --quiet || git commit -m "Update comment processing state [skip ci]"
git push || true No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just speculation, but might this introduce a race condition?

Comment thread scripts/__init__.py
@@ -0,0 +1 @@
"""Scripts for PSRT GHSA bot."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Scripts for PSRT GHSA bot."""
"""Scripts for the PSRT GHSA bot."""

- python/psrt team membership TODO: make this configurable, and allow list of org/teams?
like, what if we want PSRT to be able to responds across all PSF repos? (psf, python, pycon, pypi?)
or maybe we just say "team is $TEAM, and this bot works in $ORG as long as you are member of
that $TEAM" so we leave the user mgmt to the org admins. yeah.. probably that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that $TEAM" so we leave the user mgmt to the org admins. yeah.. probably that.
that $TEAM" so we leave the user management to the org admins.

ghsa_id: GHSA identifier

Returns:
AuthorizationResult indicating if user is authorized and a rason

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AuthorizationResult indicating if user is authorized and a rason
AuthorizationResult indicating if user is authorized and a reason

@@ -0,0 +1,312 @@
"""Command execution engine for PSRT GHSA Bot.

TODO: Maybe we should look into easily extensiblke commands

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TODO: Maybe we should look into easily extensiblke commands
TODO: Maybe we should look into easily extensible commands

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would make more sense in the repo root, no?

- If Playwright action runs before cron action, should we have playwright kick it off
so that the right groups are assigned?

- When someone duplicate a coammand we shouldnt run it twice:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- When someone duplicate a coammand we shouldnt run it twice:
- When someone duplicate a command we shouldn’t run it twice:

],
)

# set these higher so they arent noiys..

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# set these higher so they arent noiys..
# set these higher so they aren’t noisy..

Comment thread pyproject.toml
dependencies = [
"cvelib>=1.4.0",
"githubkit[auth-app]>=0.13.5",
# we might could put this into a dep group to not load it every time we install

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# we might could put this into a dep group to not load it every time we install
# We could put this into a dep group to not load it every time we install

Comment thread state.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be cleared, I don't think we need the state for jolt-org...?

@sethmlarson

Copy link
Copy Markdown
Collaborator

Since this repository may be moving to be public soon I'm going to start closing some PRs/issues that are no longer necessary (or hopefully won't be if GitHub does deliver new GHSA features).

@StanFromIreland StanFromIreland deleted the playwright-but-rebased branch June 15, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants