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

Fix logic for --reminder-comment-on-issues #33

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

perlpunk
Copy link
Contributor

store_false will actually turn the switch off when used, so the logic was reversed.

Apparently this is broken since b260dbb

Issue: https://progress.opensuse.org/issues/157522

`store_false` will actually turn the switch *off* when used, so the logic
was reversed.

Apparently this is broken since b260dbb

Issue: https://progress.opensuse.org/issues/157522
@perlpunk
Copy link
Contributor Author

argh, forgot to push to origin instead. I guess we can ignore the failed preview workflow?

@@ -275,7 +275,7 @@ def trigger_webhook(state, bad_queries):
parser.add_argument(
"--output", choices=["markdown", "influxdb"], default="markdown"
)
parser.add_argument("--reminder-comment-on-issues", action="store_false")
parser.add_argument("--reminder-comment-on-issues", action="store_true")
Copy link
Member

Choose a reason for hiding this comment

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

The default is supposed to be false, though.

Copy link
Member

Choose a reason for hiding this comment

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

Hrm. According to the docs the defaults are flipped? I guess it means reminder comments would only have been "sent" when they were not supposed to.

Copy link
Member

Choose a reason for hiding this comment

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

So the alternative is probably const? Not sure either is more readable to be honest, so I guess either way is fine by me.

Suggested change
parser.add_argument("--reminder-comment-on-issues", action="store_true")
parser.add_argument("--reminder-comment-on-issues", action="store_const", const=True)

@kalikiana kalikiana merged commit 0d75835 into openSUSE:main Mar 19, 2024
1 of 2 checks passed
@perlpunk perlpunk deleted the fix-reminder-option branch March 25, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants