jenkinsci / jenkinsci/checks-api-plugin

publishChecks Fails Silently When Unable to Infer Repository or Commit Details

Open
#276 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
49
Forks
32
Avg merge
2d 5h
Merged PRs (30d)
5

Description

### Issue summary

I had to switch back to `githubNotify` because `publishChecks `was unable to infer the repository or commit hash details. Additionally, there is no way to explicitly pass these details. There are no logs indicating whether it is skipping the operation or failing, making it difficult to debug.

### What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins 2.499
Checks API plugin Version 367.v18b_7f530e54a_
GitHub Checks plugin Version 602.v264a_83610da_6

### Reproduction steps

Using scripted pipeline, here the step for checkout

```
checkout([$class: 'GitSCM',
branches: [[name: "master}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[
$class: 'CloneOption',
noTags: true,
reference: '',
shallow: true,
depth: 1
]
,[$class: 'SparseCheckoutPaths', sparseCheckoutPaths:[[$class:'SparseCheckoutPath', path:"${path}"]]]],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: "",
url: ""]]])
```

Publishing check

`publishChecks name: 'test', status: 'IN_PROGRESS',title: 'testing',summary: 'Running', conclusion : 'NONE'`

### Expected Results

`publishChecks` should either infer the necessary details or provide a way to specify them manually.
If it cannot determine the required details, it should log a clear error or warning instead of failing silently.

### Actual Results

The function does not execute as expected, but no errors or logs provide insight into what went wrong.
Would appreciate any guidance on how to resolve this or if there's an alternative approach.

### Anything else?

_No response_

### Are you interested in contributing a fix?

yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.