GitHub
Add a donation button to your pull requests
Last updated
Add a donation button to your pull requests
Last updated
On your Account page click the "Unlock" button to access the integration capability.
On the Integrations page - generate a token. Keep it safe!
The Perk.Exchange GitHub action https://github.com/perkexchange/github-action generates invoices based on workflow input. The other actions listed in the sample steps below are included to help produce a full solution.
In your workflow directory create a pull request template having a placeholder for a button. For example DONATE_BUTTON
. The button can go anywhere in the text.
Create workflow instructions for the pull_request opened
event. Add steps for perkexchange/github-action
followed by actions/checkout
and kaskar2008/action-pr-description-replace
.
Customize the perkexchange/github-action
step with a donation amount or currency. Other values like memo and orderId can be customized.
Add your integration token from Prerequisites to a new Actions secret called PERKEXCHANGE_APITOKEN
.
The github action is setup. When a pull request is opened in the repo, an invoice will be created in Perk.Exchange for the amount and currency specified. A button will appear on the pull request page. When a user clicks the button they can view the details of the invoice and pay it using Code Wallet.