Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add configurable user and email #501

Merged
merged 4 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ inputs:
description: "GitHub token"
required: false
default: ${{ github.token }}
github_user:
description: "GitHub user name for commit changes"
default: ${{ github.actor }}
required: false
github_email:
description: "GitHub user email for commit changes"
default: "${{ github.actor }}@users.noreply.github.com"
required: false
branch:
description: "Created branch"
required: false
Expand Down
6 changes: 4 additions & 2 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9705,7 +9705,9 @@ async function run() {
baseBranch = await getDefaultBranch({ token, repository });
}

const author = getFromEnv("GITHUB_ACTOR");
const author = core.getInput("github_user");
const email = core.getInput("github_email");

return createOrUpdatePullRequest({
branch: core.getInput("branch"),
token,
Expand All @@ -9715,7 +9717,7 @@ async function run() {
commitBody: buildCommitBody(report),
repository,
author,
email: `${author}@users.noreply.github.com`,
email,
labels: commaSeparatedList(core.getInput("labels")),
});
});
Expand Down
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ async function run() {
baseBranch = await getDefaultBranch({ token, repository });
}

const author = getFromEnv("GITHUB_ACTOR");
const author = core.getInput("github_user");
ybiquitous marked this conversation as resolved.
Show resolved Hide resolved
const email = core.getInput("github_email");

return createOrUpdatePullRequest({
branch: core.getInput("branch"),
token,
Expand All @@ -94,7 +96,7 @@ async function run() {
commitBody: buildCommitBody(report),
repository,
author,
email: `${author}@users.noreply.github.com`,
email,
labels: commaSeparatedList(core.getInput("labels")),
});
});
Expand Down