Skip to content

Author identity unknown #16323

Answered by viceice
Sebclem asked this question in Request Help
Jun 29, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Your gitea account is probably missing the email or username properties.

We are using /user api to learn the username and email.

export async function getCurrentUser(
options?: GiteaHttpOptions
): Promise<User> {
const url = `${API_PATH}/user`;
const res = await giteaHttp.getJson<User>(url, options);
return res.body;
}

const user = await helper.getCurrentUser({ token });
gitAuthor = `${user.full_name ?? user.username} <${user.email}>`;
botUserID = user.id;
botUserName

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Sebclem
Comment options

Answer selected by Sebclem
Comment options

You must be logged in to vote
1 reply
@viceice
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #16323 on June 29, 2022 09:20.