Skip to main content

commit_authors

Creates, updates, deletes, gets or lists a commit_authors resource.

Overview​

Namecommit_authors
TypeResource
Idgithub.migrations.commit_authors

Fields​

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idinteger
namestring
remote_idstring
remote_namestring
emailstring
import_urlstring (uri)
urlstring (uri)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_commit_authorsselectowner, reposinceEach type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username hubot into something like hubot <hubot@12341234-abab-fefe-8787-fedcba987654>.

This endpoint and the Map a commit author endpoint allow you to provide correct Git author information.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.
map_commit_authorupdateowner, repo, author_idUpdate an author's identity for the import. Your application can continue updating authors any time before you push
new commits to the repository.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
author_idinteger
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
sinceintegerA user ID. Only return users with an ID greater than this ID.

SELECT examples​

Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username hubot into something like hubot <hubot@12341234-abab-fefe-8787-fedcba987654>.

This endpoint and the Map a commit author endpoint allow you to provide correct Git author information.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

SELECT
id,
name,
remote_id,
remote_name,
email,
import_url,
url
FROM github.migrations.commit_authors
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND since = '{{ since }}'
;

UPDATE examples​

Update an author's identity for the import. Your application can continue updating authors any time before you push
new commits to the repository.

> [!WARNING]
> Endpoint closing down notice: Due to very low levels of usage and available alternatives, this endpoint is closing down and will no longer be available from 00:00 UTC on April 12, 2024. For more details and alternatives, see the changelog.

UPDATE github.migrations.commit_authors
SET
email = '{{ email }}',
name = '{{ name }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND author_id = '{{ author_id }}' --required
RETURNING
id,
name,
remote_id,
remote_name,
email,
import_url,
url;