---
name: "API::GitForge::Role::GitForge"
section: "3pm"
platform: "linux"
package: "libapi-gitforge-perl"
version: "0.007-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/API::GitForge::Role::GitForge"
---

# API::GitForge::Role::GitForge(3pm)

role implementing generic git forge operations

## NAME

API::GitForge::Role::GitForge - role implementing generic git forge operations

## VERSION

version 0.007

## DESCRIPTION

Operations which one might wish to perform against any git forge.  See API::GitForge.

In this documentation, `"example.com"` should be replaced with the domain at which your git forge is hosted, e.g. `"salsa.debian.org"`.

## METHODS

### new(domain =\> $domain, access\_token =\> $token)

Instantiate an object representing the GitForge at `$domain`.  The `"access_key"` argument is optional; if present, it should be an API key for the forge.

### ensure\_repo($repo)

Create a new repo at `"https://example.com/$repo"`.

### clean\_repo($repo)

Create a new repo at `"https://example.com/$repo"` and turn off optional forge features.

### ensure\_fork($upstream)

Ensure that the current user has a fork of the repo at `"https://example.com/$upstream"`, and return URI to that fork suitable for adding as a git remote.

### clean\_fork($upstream)

Ensure that the current user has a fork of the repo at `"https://example.com/$upstream"`, config that fork to make it obvious it's only there for submitting change proposals, and return URI to fork suitable for adding as a git remote.

### nuke\_fork($upstream)

Delete the user's fork of the repo at `"https://example.com/$upstream"`.

### clean\_config\_repo($repo)

Turn off optional forge features for repo at `"https://example.com/$repo"`.

### clean\_config\_fork($upstream)

Configure user's fork of repo at `"https://example.com/$upstream"` to make it obvious that it's only there for submitting change proposals.

## STATUS

Unstable.  Interface may change.

## AUTHOR

Sean Whitton \<spwhitton@spwhitton.name\>

## COPYRIGHT AND LICENSE

This software is Copyright (c) 2017, 2020 by Sean Whitton \<spwhitton@spwhitton.name\>.

This is free software, licensed under:

```
  The GNU General Public License, Version 3, June 2007
```
