Skip to content

More descriptive Github checks log message #390

@sfc-gh-kbregula

Description

@sfc-gh-kbregula

What feature do you want to see added?

Currently, the status line that informs that the check is published looks like this:

[GitHub Checks] GitHub check (name: Jenkins, status: completed) has been published.

If the status is completed, it is also worth adding information about the conclusion (one of the values: action_required, cancelled, failure, neutral, success, skipped, stale, timed_out)
so log message will be as below:

[GitHub Checks] GitHub check (name: Jenkins, status: completed, conclusion: failure) has been published.

The code responsible for this:

buildLogger.log("GitHub check (name: %s, status: %s) has been published.", gitHubDetails.getName(),

I have the impression that we just need to change the code as below, but I haven't checked that:

-            buildLogger.log("GitHub check (name: %s, status: %s) has been published.", gitHubDetails.getName(),
-                    gitHubDetails.getStatus());
+            String conclusion = gitHubDetails.getConclusion();
+            if(conclusion != null) {
+                buildLogger.log("GitHub check (name: %s, status: %s, conclusion: %s) has been published.", gitHubDetails.getName(),
+                        gitHubDetails.getStatus(), conclusion);
+            }else {
+                buildLogger.log("GitHub check (name: %s, status: %s) has been published.", +gitHubDetails.getName(),
+                    gitHubDetails.getStatus());
+            }
+

Upstream changes

No response

Are you interested in contributing this feature?

Unfortunately no, because it is too complicated from the point of view of corporate procedures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions