|
| 1 | +# GitHub integration |
| 2 | + |
| 3 | +{% hint style="info" %} |
| 4 | +If you’re new to integrations in Rewst, read through our introductory integration documentation [here](https://docs.rewst.help/documentation/integrations). |
| 5 | + |
| 6 | +GitHub’s own documentation for registering an app can be found [here](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app). |
| 7 | +{% endhint %} |
| 8 | + |
| 9 | +## What does the GitHub integration do? |
| 10 | + |
| 11 | +Our GitHub integration enables automation of GitHub’s version control system. Use GitHub’s API within Rewst workflows to automate aspects of version control in GitHub. |
| 12 | + |
| 13 | +### Integration use cases |
| 14 | + |
| 15 | +* Say you want to create a Crate that automatically backs up all workflow exports any time they change. You could use the GitHub integration to make a commit of each change of the file. This would give you a more fully featured option than Rewst’s built in version control. |
| 16 | +* Use this integration to set up a system for sharing workflows you’ve created with other Rewst customers. Create a public repository, and post exported repositories of your shareable workflows. |
| 17 | + |
| 18 | +## Set up the GitHub integration |
| 19 | + |
| 20 | +### Set up steps in GitHub |
| 21 | + |
| 22 | +1. Log in to the GitHub account linked to your organization. |
| 23 | + |
| 24 | +### Set up steps in Rewst |
| 25 | + |
| 26 | +1. Navigate to **Configuration > Integrations** in the left side menu of your Rewst platform. |
| 27 | +2. In the Integrations page, search for the GitHub integration.\ |
| 28 | + \ |
| 29 | +  |
| 30 | +3. Click the integration tile to launch the **Configuration** setup page. |
| 31 | +4. Enter the following in the relevant fields of the form: |
| 32 | + 1. The **Name** that will be used to refer to the integration configuration |
| 33 | + 2. **Description**: this is optional. |
| 34 | + 3. Check the **Is Default** checkbox. |
| 35 | + 4. **Organization Name**: make sure that this is exact to how your organization name appears in GitHub. |
| 36 | +5. Click **Save Configuration**. |
| 37 | +6. Click **Authorize**. |
| 38 | +7. Click **Continue** next to your desired installation location, from the list in the dialog that appears. The dialog will contain a list of organizations. It’s important that you choose the organization to match the one you entered for the organization name of the Rewst configuration form.\ |
| 39 | + \ |
| 40 | + \ |
| 41 | + |
| 42 | +8. Click **Install & Authorize**.\ |
| 43 | + \ |
| 44 | +  |
| 45 | +9. A green confirmation message will appear at the top of your screen. Now, the configuration form will have an option to **Re-Authorize**. |
| 46 | + |
| 47 | +## Test the Integration |
| 48 | + |
| 49 | +Whenever you save configuration and reauthorize, Rewst will run a test action to make sure the integration is working.\ |
| 50 | + |
| 51 | + |
| 52 | +<figure><img src="../../../.gitbook/assets/Screenshot 2025-02-10 at 5.22.03 PM.png" alt=""><figcaption></figcaption></figure> |
| 53 | + |
| 54 | +For additional testing, click the Refresh Options button under the Organization Mapping section of the integration configuration page. This will return a list of repositories accessible by that organization. |
| 55 | + |
| 56 | +## Troubleshoot the GitHub integration |
| 57 | + |
| 58 | +{% hint style="warning" %} |
| 59 | +The below error may also happen if you attempt to install the GitHub integration on multiple Rewst orgs using the same GitHub org. |
| 60 | + |
| 61 | +If you encounter any errors, contact us in your Discord support channel for assistance. |
| 62 | +{% endhint %} |
| 63 | + |
| 64 | +If you uninstall the GitHub integration in Rewst but don’t uninstall our GitHub App in your organization, any attempt to re-install and authorize the integration will fail, and you’ll be stuck at this screen:\ |
| 65 | + |
| 66 | + |
| 67 | +<figure><img src="../../../.gitbook/assets/image (11) (1).png" alt=""><figcaption></figcaption></figure> |
| 68 | + |
| 69 | +To fix this failure: |
| 70 | + |
| 71 | +1. Log in to GitHub. |
| 72 | +2. Find the installed GitHub App. |
| 73 | +3. Click the **Configure** button. |
| 74 | +4. Uninstall the app. You should now be able to re-authorize in Rewst, and the GitHub App will be reinstalled once successful. |
| 75 | + |
| 76 | +<figure><img src="../../../.gitbook/assets/image (12) (1).png" alt=""><figcaption></figcaption></figure> |
| 77 | + |
| 78 | +<figure><img src="../../../.gitbook/assets/image (13) (1).png" alt=""><figcaption></figcaption></figure> |
| 79 | + |
| 80 | +## GitHub actions and endpoints |
| 81 | + |
| 82 | +{% hint style="info" %} |
| 83 | +For more on how actions work in Rewst, check out our [introductory actions documentation here](https://docs.rewst.help/documentation/workflows/actions-in-rewst). |
| 84 | +{% endhint %} |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +| Category | Action | Description | |
| 89 | +| ----------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 90 | +| **Billing** | Get Github Actions Billing For An Organization | Gets the summary of the free and paid GitHub Actions minutes used. Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. | |
| 91 | +| **Billing** | Get Github Packages Billing For An Organization | Gets the free and paid storage used for GitHub Packages in gigabytes. Paid minutes only apply to packages stored for private repositories. | |
| 92 | +| **Billing** | Get Shared Storage Billing For An Organization | Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. Paid minutes only apply to packages stored for private repositories. | |
| 93 | +| **Billing** | Get Github Actions Billing For a User | Gets the summary of the free and paid GitHub Actions minutes used. Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. | |
| 94 | +| **Billing** | Get Github Packages Billing For a User | Gets the free and paid storage used for GitHub Packages in gigabytes. Paid minutes only apply to packages stored for private repositories. | |
| 95 | +| **Billing** | Get Shared Storage Billing For a User | Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. Paid minutes only apply to packages stored for private repositories. | |
| 96 | +| **Checks** | Create a Check Run | Creates a new check run for a specific commit in a repository. To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite. | |
| 97 | +| **Checks** | Get a Check Run | Gets a single check run using its `id`. **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. | |
| 98 | +| **Checks** | Update a Check Run | Updates a check run for a specific commit in a repository. **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. | |
| 99 | +| **Checks** | Rerequest a Check Run | Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This will trigger the `check_run` webhook event with the action `rerequested`. | |
| 100 | +| **Checks** | List Check Runs In a Check Suite | Lists check runs for a check suite using its `id`. **Note:** The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. | |
| 101 | +| **Checks** | Rerequest a Check Suite | Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This will trigger the `check_suite` webhook event with the action `rerequested`. | |
| 102 | + |
| 103 | +{% hint style="info" %} |
| 104 | +Got an idea for a new Integration? Rewst is constantly adding new integrations to our integrations page. Submit your idea or upvote existing ideas here in our [Canny feedback collector](https://rewst.canny.io/integrations). |
| 105 | +{% endhint %} |
0 commit comments