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

More descriptive Github checks log message #390

Open
sfc-gh-kbregula opened this issue Jun 26, 2024 · 0 comments
Open

More descriptive Github checks log message #390

sfc-gh-kbregula opened this issue Jun 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sfc-gh-kbregula
Copy link

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.

@sfc-gh-kbregula sfc-gh-kbregula added the enhancement New feature or request label Jun 26, 2024
@sfc-gh-kbregula sfc-gh-kbregula changed the title More descriptive Github checks publish log message More descriptive Github checks log message Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant