Skip to content
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

add repoproc for allow_auto_merge #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jdelic
Copy link
Member

@jdelic jdelic commented May 21, 2024

No description provided.

@jdelic jdelic requested a review from doismellburning May 21, 2024 13:45
Copy link
Contributor

@doismellburning doismellburning left a comment

Choose a reason for hiding this comment

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

My comment aside, this broadly looks reasonable, but I'd be wary of hitting "Approve" without some actual computer testing / linting etc. - I definitely haven't done any of that myself


return change.success()

if not repo.allow_auto_merge:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this check? Doesn't this mean we'll only create a Change if the repo doesn't already allow AM? But surely we still want to if it does and we're unsetting it? Plus this makes the if in 364 always False, no?

@jdelic
Copy link
Member Author

jdelic commented May 21, 2024

My comment aside, this broadly looks reasonable, but I'd be wary of hitting "Approve" without some actual computer testing / linting etc. - I definitely haven't done any of that myself

neither have I. 😬

And you're right, this code is sus. The reason for it is that GitHub Copilot dutifully created a function with the exact same pattern as the one above, which has the same logic bug. Together with #17 this should make more sense now.

I'll still test it in a quiet minute tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants