Skip to content

add automod action#111

Merged
jbhannah merged 2 commits intomainfrom
automod
Oct 1, 2025
Merged

add automod action#111
jbhannah merged 2 commits intomainfrom
automod

Conversation

@jbhannah
Copy link
Copy Markdown
Collaborator

automatically close and lock prs that change more than a single line.

automatically close and lock prs that change more than a single line.
@jbhannah jbhannah marked this pull request as draft September 26, 2025 15:49
@jbhannah
Copy link
Copy Markdown
Collaborator Author

jbhannah commented Sep 26, 2025

gonna do a second take using https://github.com/vloddi/changed-lines-count-labeler to label prs with >= 2 lines changed as spam, and a workflow to close and lock prs/issues with https://github.com/dessant/repo-lockdown when the spam label is added to them.

@madrobby
Copy link
Copy Markdown
Collaborator

@jbhannah note that it's possible that there's more than one signature in a PR e.g. effc2b9

@jbhannah
Copy link
Copy Markdown
Collaborator Author

@madrobby fair point, but i think it's a reasonable restriction to put in place that each signature be its own commit, for the sake of making it easier to keep bad actors out. otoh, should be ok to bump the limit to 2 signatures in one pr without decreasing effectiveness.

@madrobby
Copy link
Copy Markdown
Collaborator

@jbhannah yeah, agree. (we should check closed PRs occasionally if we missed something; I guess it's sort of like a spam filter in email.)

@Floppy
Copy link
Copy Markdown
Collaborator

Floppy commented Sep 26, 2025

Typical that while you're working on this we get our first double-signature PR 😆

Anyway, this looks really helpful, it's much appreciated.

@Plan-Vert Plan-Vert deleted a comment from mburz Sep 26, 2025
@Plan-Vert Plan-Vert deleted a comment from mburz Sep 26, 2025
@Plan-Vert Plan-Vert deleted a comment from mburz Sep 26, 2025
@jbhannah
Copy link
Copy Markdown
Collaborator Author

deleting unhelpful comments because i find it personally hilarious btw

@drewcassidy
Copy link
Copy Markdown

could lock PRs that delete any lines, since any signatures should be append-only

Comment thread .github/workflows/automod.yml Outdated
Copy link
Copy Markdown
Contributor

@shkm shkm left a comment

Choose a reason for hiding this comment

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

Currently failing due to lack of permissions; I suspect this will resolve it.

Co-authored-by: Jamie Schembri <jamie@schembri.me>
@github-actions github-actions Bot closed this Sep 30, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 30, 2025
@Floppy
Copy link
Copy Markdown
Collaborator

Floppy commented Oct 1, 2025

... did this PR just close and lock itself? 😆

@Plan-Vert Plan-Vert unlocked this conversation Oct 1, 2025
@jbhannah
Copy link
Copy Markdown
Collaborator Author

jbhannah commented Oct 1, 2025

lmaoooooo i guess that means it works 🤣

@jbhannah jbhannah reopened this Oct 1, 2025
@jbhannah jbhannah marked this pull request as ready for review October 1, 2025 14:25
@github-actions github-actions Bot closed this Oct 1, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 1, 2025
@jbhannah
Copy link
Copy Markdown
Collaborator Author

jbhannah commented Oct 1, 2025

um

…ok so i'm gonna merge and push this to trunk manually

@jbhannah jbhannah merged commit a1df1a3 into main Oct 1, 2025
0 of 2 checks passed
@jbhannah jbhannah deleted the automod branch October 1, 2025 14:27
@Floppy
Copy link
Copy Markdown
Collaborator

Floppy commented Oct 1, 2025

🤣

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants