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 one-click-pr-or-gist private free repos pr creation #6392

Merged

Conversation

DraftProducts
Copy link
Contributor

Closes #6391

This page affects PR creation in private repos

Screenshot

Without the fix

With the fix

@yakov116
Copy link
Member

It would be better to check if the "unable to create draft" button exists. Since now if the dom changes at any point we won't see any errors

@fregante
Copy link
Member

I think that we just want to leave the drop-down untouched in that case.

Can you craft a selector for that "teams" label and add it as a function in the exclude array? Find "exclude" on https://github.com/refined-github/refined-github/blob/main/contributing.md#featuresadd for more info

@DraftProducts
Copy link
Contributor Author

DraftProducts commented Feb 26, 2023

Hi @fregante 👋
I'd like to propose an alternative rather than disabling this feature.
If the goal is to keep the promoted paid plan, couldn't we just recreate a button next to it that would continue to open the promotion modal? Adding the attribute data-show-dialog-id="drafts-upgrade-dialog" to any button would open it.

image

Something like that :
image

@fregante
Copy link
Member

No, there's no point in keeping the feature enabled for a button that doesn't work.

We can't hide it (as in your original screenshot) and we should not hide the inline documentation/explanation. So leaving it alone is the easiest thing to do (also because there will be no one around to fix it when it breaks)

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Thank you, excellent! 💚

Copy link

@CyberFlameGO CyberFlameGO left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Tested and it works, thank you!

@fregante fregante merged commit b03be18 into refined-github:main Mar 1, 2023
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.

one-click-pr-or-gist is broken in free private repos
4 participants