app icon indicating copy to clipboard operation
app copied to clipboard

Add support for 'sponsorships'

Open SkypLabs opened this issue 6 years ago • 13 comments

Hi,

The sponsorship links have been added to GitHub. To enable them, a checkbox needs to be ticked and it would be nice to be able to do it via GitHub Settings.

Cheers.

SkypLabs avatar Aug 17 '19 22:08 SkypLabs

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar Nov 15 '19 23:11 stale[bot]

Still relevant.

SkypLabs avatar Nov 25 '19 08:11 SkypLabs

i agree that this would be valuable, but haven't had a chance to spend time on an implementation. i'd be happy to help guide you if you would be interested in attempting a PR to add this capability.

travi avatar Dec 04 '19 05:12 travi

i finally got a chance to at least look at the api docs for this. i do not find any mention of sponsor/funding in https://developer.github.com/v3/repos/#edit

so, the first thing that would be helpful would be to contact github support and request the ability to configure this through the api. please respond here if you hear useful information back from them

GitHub Developer
Get started with one of our guides, or jump straight into the API documentation.

travi avatar Jan 28 '20 05:01 travi

Hi @travi,

Thank you for your help offer and for having had a look at the GitHub API documentation.

I thought again about the added value of this new feature and I'm actually wondering if it's a good idea in the end. Let's say that the template option is enabled via Probot Settings on a Git repository and that someone clicks on the Use this tempate button of the template's Git repository page. As a result, GitHub will basically clone the repository into another namespace but without keeping the Git history. If Probot Settings is enabled in the target namespace, it will apply the configuration of the template repository to the freshly cloned one, changing even its name which I think is not the desired behaviour.

I look forward to hearing your opinion on the above issue.

SkypLabs avatar Feb 09 '20 13:02 SkypLabs

I'm not sure i follow the concern fully. If you are simply referring to settings being applied in a new repository created from a template that contains a settings file, that doesn't seem specific to sponsorships. Am i missing a detail that is specific to this issue?

If you are referring to the more general concern, i think my recommendation would be to either only include settings in a template repository that are actually intended to apply when a repo is created from that template. Sometimes that means not including a settings file at all, sometimes limiting what is included, or sometimes limiting what is included by extending from a .github repository and moving account level settings there instead. If this were supported, i would have sponsorship defined at the account level rather than peer project anyway.

Regardless, i don't understand why this would translate into a reason why settings should not support configuring sponsorships specifically. Could you clarify if your concern is sponsorship specific? If there is something more general that you think we should consider, please feel free to open another issue so we can discuss in more detail.

travi avatar Feb 09 '20 16:02 travi

Oh sorry my bad, I commented the wrong issue. It was meant to be for #133 that I also created :face_palm:

SkypLabs avatar Feb 09 '20 16:02 SkypLabs

I will copy my comment into #133 to keep the integrity of the conversation when I'll be on a larger screen (on my smartphone right now).

SkypLabs avatar Feb 09 '20 16:02 SkypLabs

Ah, that certainly makes more sense. I'll mark these as of topic then, but feel free to expand to copy across.

travi avatar Feb 09 '20 17:02 travi

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

stale[bot] avatar May 09 '20 17:05 stale[bot]

A thread has been opened on the official GitHub Support Community Forum to request the possibility to enable the "Sponsor" button via the API: https://github.community/t/how-to-enable-the-sponsor-button-in-a-repository-using-github-api/14879.

GitHub Support Community
On the tutorial Displaying a sponsor button in your repository it is showed how to enable the sponsor button, using the GitHub web interface: But how to enable it using the GitHub API? I use this to enable the issue tracker on my repositories: curl \ -H "Authorization: Token {token}" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -X PATCH \ --data '{"name": "repository_name", "has_issues": True}' \ https://api.github.com/repos/user/repository...

SkypLabs avatar May 27 '20 22:05 SkypLabs

That's too bad the API doesn't support it. Confirmed it in the link below for future reference.

https://docs.github.com/en/rest/repos/repos#update-a-repository

GitHub Docs
Get started, troubleshoot, and make the most of GitHub. Documentation for new users, developers, administrators, and all of GitHub's products.

nitrocode avatar May 24 '22 15:05 nitrocode

From the settings page, I can see the following form data when I disable sponsorship

-----------------------------REDACTED
Content-Disposition: form-data; name="enable_repository_funding_links"

0

and when I enable sponsorship

-----------------------------REDACTED
Content-Disposition: form-data; name="enable_repository_funding_links"

1

But this is completely undocumented.

nitrocode avatar May 24 '22 16:05 nitrocode