Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Jul 30, 2021
1 parent 7198278 commit 8c3655d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ func New(ctx context.Context) (*Repo, error) {
splitted := strings.SplitN(strings.Trim(string(b), "\n"), " ", 3)
v := splitted[2]

if os.Getenv("CI") != "" && os.Getenv("GITHUB_RUN_ID") != "" {
name := "github-actions"
email := "github-actions@github.com"
if os.Getenv("GITHUB_ACTOR") != "" {
name = os.Getenv("GITHUB_ACTOR")
email = fmt.Sprintf("%s@users.noreply.github.com", os.Getenv("GITHUB_ACTOR"))
}
// set temporary config
if err := exec.CommandContext(ctx, "git", "-C", r.d, "config", "user.name", os.Getenv("GITHUB_ACTOR")).Run(); err != nil {
return nil, err
}
if err := exec.CommandContext(ctx, "git", "-C", r.d, "config", "user.email", email).Run(); err != nil {
return nil, err
}
}

d, err := os.MkdirTemp("", "pr-revert")
if err != nil {
return nil, err
Expand Down

0 comments on commit 8c3655d

Please sign in to comment.