Skip to content

Commit 725d1c6

Browse files
authored
Merge pull request #1662 from mazurenkoe/adddisplayTitleParameterToGHWorkflowRun
Added display_title parameter for workspace run
2 parents 77e2d8f + c1b747f commit 725d1c6

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/main/java/org/kohsuke/github/GHWorkflowRun.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class GHWorkflowRun extends GHObject {
3030
private GHRepository owner;
3131

3232
private String name;
33+
private String displayTitle;
3334
private long runNumber;
3435
private long workflowId;
3536

@@ -65,6 +66,15 @@ public String getName() {
6566
return name;
6667
}
6768

69+
/**
70+
* The display title of the workflow run.
71+
*
72+
* @return the displayTitle
73+
*/
74+
public String getDisplayTitle() {
75+
return displayTitle;
76+
}
77+
6878
/**
6979
* The run number.
7080
*

src/test/java/org/kohsuke/github/GHEventPayloadTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,7 @@ public void workflow_run() throws Exception {
10621062
assertThat(workflowRun.getId(), is(680604745L));
10631063
assertThat(workflowRun.getName(), is("CI"));
10641064
assertThat(workflowRun.getHeadBranch(), is("main"));
1065+
assertThat(workflowRun.getDisplayTitle(), is("its-display-title"));
10651066
assertThat(workflowRun.getHeadSha(), is("dbea8d8b6ed2cf764dfd84a215f3f9040b3d4423"));
10661067
assertThat(workflowRun.getRunNumber(), is(6L));
10671068
assertThat(workflowRun.getEvent(), is(GHEvent.WORKFLOW_DISPATCH));

src/test/resources/org/kohsuke/github/GHEventPayloadTest/workflow_run.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"node_id": "MDExOldvcmtmbG93UnVuNjgwNjA0NzQ1",
77
"head_branch": "main",
88
"head_sha": "dbea8d8b6ed2cf764dfd84a215f3f9040b3d4423",
9+
"display_title": "its-display-title",
910
"run_number": 6,
1011
"event": "workflow_dispatch",
1112
"status": "completed",

0 commit comments

Comments
 (0)