Skip to content

Commit 464b769

Browse files
Added email setup for CI
1 parent 3ab2a12 commit 464b769

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/io/micrometer/release/train/DependencyVerifier.java

+2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ private void triggerDependabotCheck(File clonedRepo) {
180180
log.info("Added trigger comment to dependabot.yml");
181181
}
182182
Files.writeString(path, fileContent);
183+
processRunner.run("git", "config", "user.name", "GitHub Action");
184+
processRunner.run("git", "config", "user.email", "[email protected]");
183185
processRunner.run("git", "add", filePath);
184186
processRunner.run("git", "commit", "-m",
185187
"ci: " + (hasComment ? "Remove" : "Add") + " dependabot trigger comment");

src/test/java/io/micrometer/release/train/DependencyVerifierTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
import io.micrometer.release.common.GradleParser;
1919
import io.micrometer.release.common.ProcessRunner;
2020
import io.micrometer.release.common.TestGradleParser;
21-
22-
import java.util.List;
23-
2421
import org.junit.jupiter.api.BeforeEach;
2522
import org.junit.jupiter.api.Test;
2623
import org.mockito.InOrder;
@@ -31,6 +28,7 @@
3128
import java.net.URISyntaxException;
3229
import java.nio.file.Files;
3330
import java.util.Collections;
31+
import java.util.List;
3432
import java.util.concurrent.TimeUnit;
3533

3634
import static org.assertj.core.api.BDDAssertions.thenThrownBy;
@@ -100,6 +98,8 @@ void should_receive_updated_dependabot_status() throws IOException {
10098

10199
InOrder inOrder = Mockito.inOrder(processRunner);
102100
inOrder.verify(processRunner).run("gh", "api", "/", "--include");
101+
inOrder.verify(processRunner).run("git", "config", "user.name", "GitHub Action");
102+
inOrder.verify(processRunner).run("git", "config", "user.email", "[email protected]");
103103
inOrder.verify(processRunner).run("git", "add", ".github/dependabot.yml");
104104
inOrder.verify(processRunner)
105105
.run(eq("git"), eq("commit"), eq("-m"), matches("ci: (Add|Remove) dependabot trigger comment"));

0 commit comments

Comments
 (0)