> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# topmonks/github

Integrate Github CLI with your CircleCI CI/CD pipeline easily with the github orb.


## Commands

### install

Installs latest Github CLI

| Parameter | Type | Default | Description |
|---|---|---|---|
| `release` | string | latest |  |
| `arch` | enum | amd64 |  |

### set_repo

Sets default repository for Github CLI

| Parameter | Type | Default | Description |
|---|---|---|---|
| `repo` | string |  | The repository to set as default. Can be specified in the format OWNER/REPO. |

### merge_pr

Merges current Pull Request

| Parameter | Type | Default | Description |
|---|---|---|---|
| `delete_branch` | boolean | false | Delete the local and remote branch after merge |
| `merge` | boolean | false | Merge the commits with the base branch |
| `rebase` | boolean | false | Rebase the commits onto the base branch |
| `squash` | boolean | false | Squash the commits into one commit and merge it into the base branch |

### release

Create a new GitHub Release for a repository.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string |  | If a matching git tag does not yet exist, one will automatically get created from the latest state of the default branch. Use --target to override this.
To create a release from an annotated git tag, first create one locally with git, push the tag to GitHub, then run this command.
 |
| `files` | string |  | A list of asset files |
| `generate_notes` | boolean | false | Automatically generate title and notes for the release |
| `draft` | boolean | false | Save the release as a draft instead of publishing it |
| `notes_file` | string |  | Read release notes from file |

## Examples

### automerge_dependabot_prs

Automerges successful build of Dependabot Pull Request


```yaml
version: 2.1
orbs:
  github: topmonks/github@1.2.0
jobs:
  merge_pr:
    docker:
      - image: cimg/base:current
    steps:
      - checkout
      - github/install
      - github/merge_pr:
          rebase: true
workflows:
  ci:
    jobs:
      - merge_pr:
          context: github-cli
          requires:
            - build
          filters:
            branches:
              only: /dependabot\/.*/
```