Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Wrong commit author when triggered by cron #8

Open
nin-jin opened this issue Jul 16, 2020 · 2 comments
Open

Wrong commit author when triggered by cron #8

nin-jin opened this issue Jul 16, 2020 · 2 comments

Comments

@nin-jin
Copy link
Contributor

nin-jin commented Jul 16, 2020

Latest commit to master: hyoo-ru/mol.hyoo.ru@6da2cca
image

Latest commit to gh-pages: hyoo-ru/mol.hyoo.ru@f9d1bbd
image

Workflow: https://github.com/hyoo-ru/mol.hyoo.ru/blob/master/.github/workflows/deploy.yml

What could it be from?

@alex-page
Copy link
Owner

alex-page commented Jul 16, 2020

The author is set by the user who does the commit into master. I use GITHUB_ACTOR to get that information.

GITHUB_ACTOR
The name of the person or app that initiated the workflow. For example, octocat.

You can see how it is set up here:

const {GITHUB_ACTOR, GITHUB_REPOSITORY} = process.env;
gitHubPages.publish(
siteDirectory,
{
branch: deployBranch,
repo: `https://${repoToken}@github.com/${GITHUB_REPOSITORY}.git`,
user: {
name: GITHUB_ACTOR,
email: `${GITHUB_ACTOR}@users.noreply.github.com`
},
dotfiles: true,
message: commitMessage
},

@nin-jin
Copy link
Contributor Author

nin-jin commented Jul 16, 2020

The author is set by the user who does the commit into master.

But last commit to master is my, not @zerkalica.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants