Git config --global user.email = "email@example.com" and user.name error in GitHub action - Stack Overflow

PHOTO EMBED

Tue Jan 31 2023 01:09:18 GMT+0000 (Coordinated Universal Time)

Saved by @gebaby #yaml

import { context } from '@actions/github';

const author = context.payload.commits[0].author; // Be careful using this, it may not always be here. For example, in the case of a pull_request triggered action, this will result in an error.
await exec(`git config --local user.name "${author.name}"`);
await exec(`git config --local user.email "${author.email}"`);
content_copyCOPY

https://stackoverflow.com/questions/61432453/git-config-global-user-email-emailexample-com-and-user-name-error-in-gith?answertab