Comments (7)
There are a few possible improvements:
- Add
public void applyTo(ChecksDetails)
to ChecksInfo and make consumers call that instead of copying the name themselves. This would let later versions of checks-api-plugin add features to ChecksInfo without always needing more changes in consumers. - Give StepContext or just StepContext::get as a parameter to ChecksPublisherFactory.createPublisher. This would let implementing plugins define pipeline steps that add SCM-specific info types to the context, and then look them up when publishing. This would belong in ChecksPublisherFactory rather than ChecksPublisher, so that the SCM-specific info could include API endpoints etc. and make the ChecksPublisherFactory eligible even if it would not otherwise be.
I should file separate requests for those, I guess.
from checks-api-plugin.
do you mean the actions in GitHub checks API? And when you click on that button, a request from GitHub will be sent to your Jenkins? May I ask what are you going to use it for?
from checks-api-plugin.
@XiongKezhi yes, I actually meant to put this on jenkinsci/github-checks-plugin (I had both tabs open). Oops.
There could be any number of reasons to add actions. Perhaps someone builds debug by default as a PR check, but sometimes they want a release build (or vice versa). Maybe it annotated a couple lines which can be auto-fixed with a "Fix these" action, etc.
from checks-api-plugin.
I'm planning to implement this, along with #28.
But the only thing we can do is no more than exposing the API to add action buttons, the handlers/subscribers for those actions still need the implementation from the users themselves, like https://github.com/jenkinsci/github-checks-plugin/blob/master/src/main/java/io/jenkins/plugins/checks/github/CheckRunGHEventSubscriber.java.
from checks-api-plugin.
A use case that may be relevant:
I have a Jenkins job that builds HTML documentation and publishes it to a web server (as opposed to having Jenkins serve it). I'd like to post the web server address to the SCM system as part of a checks report, so that I can browse to it without going through Jenkins. However, the SCM is not GitHub and does not support Markdown in the report. Instead, it supports links that have a title and a URL. If I could have the Jenkinsfile generate the web site URL and publish that via Checks API as if it were an action, then that would be cool. Thus, I hope that the actions API being added will allow URLs that do not point to Jenkins.
It would be even better if I could make the link part of the checks report that is already published by another plugin, rather than a separate report. I imagine the withChecks
step could be changed to take links as an argument. With the current Checks API though, it seems this would require changing the consumer plugins such as Warnings NG as well, because implementations of ChecksPublisher cannot discover ChecksInfo themselves.
from checks-api-plugin.
... Instead, it supports links that have a title and a URL ... Thus, I hope that the actions API being added will allow URLs that do not point to Jenkins.
If only considering GitHub, this is not possible. The action for GitHub is just adding buttons to the checks report and used for users to require additional behavior that is pre-defined in Jenkins. But since we are now at the API level and as you said, the SCM is not GitHub, so we can discuss and define a wider-scoped API (not only in this action part) for users if we can have a better abstraction beyond the GitHub one.
I imagine the withChecks step could be changed to take links as an argument. With the current Checks API though, it seems this would require changing the consumer plugins such as Warnings NG as well, because implementations of ChecksPublisher cannot discover ChecksInfo themselves.
This could be done, and yes, this requires changes of the consumers. But if we want to forcefully change the link published by consumers, maybe we need another step, since it's not our purpose of the withChecks
.
from checks-api-plugin.
The basic functionality to add action buttons is fixed by #85.
from checks-api-plugin.
Related Issues (20)
- .pom file uploaded for 1.7.1? HOT 1
- Multiple Github repo's / global pipeline libraries how do we control the repo to which the checks are reported HOT 14
- Primary error message is not shown in error header, instead says `error in 'error' step` HOT 5
- Do not report handled exceptions HOT 3
- Build log Output truncated. - print tail of log instead of head HOT 2
- Allow using specific credentials for Checks HOT 5
- How do I create a custom rerun check in Pipeline HOT 1
- 1.7.5: download plugin checks-api to file: status code: 403, reason phrase: Forbidden HOT 2
- Phantom release 1.7.5 of checks-api HOT 1
- Possibility Of Specifying Credentials HOT 3
- Fix flaky test `BuildStatusChecksPublisherITest.shouldPublishStageDetails`
- [Question] Hanging checks with "withChecks()" HOT 5
- Include optional checks publisher to warnError HOT 1
- [doc] How to get started? HOT 5
- How to publish checks from sub-jobs HOT 1
- Dependency Dashboard
- Tests fail on Java 21 with Mockito errors HOT 2
- Setting Status checks name does not change it from the default Jenkins HOT 4
- Dependencies of flattened POM of latest release do not match `MANIFEST.MF`
- Return information about the check
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checks-api-plugin.