Code Monkey home page Code Monkey logo

Comments (5)

bluesliverx avatar bluesliverx commented on July 1, 2024

The plugin adds a cause to any build it triggers with information about the comment, including the author. See https://github.com/jenkinsci/github-pr-comment-build-plugin/blob/master/src/main/java/com/adobe/jenkins/github_pr_comment_build/GitHubPullRequestCommentCause.java or the other two causes next to it.

This can be retrieved from the pipeline using the currentBuild.rawBuild.causes (see https://javadoc.jenkins-ci.org/hudson/model/Run.html#getCauses--). It would need to be in a method marked @NonCPS because rawBuild is not serializable, and it may need to be approved in the script console, not sure.

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 1, 2024

Actually, looking at it, I don't see any fields for the author, but that would be easy to add. Just add the field in the cause class and then add it to the constructor in the events subscriber(s). That would do it, then you could just access it through the causes.

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 1, 2024

I pushed a fix for this, as soon as it builds and merges, I'll trigger a new release.

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 1, 2024

Waiting for jenkins-infra/repository-permissions-updater#2090 to be merged before this can be released.

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 1, 2024

I changed the versioning scheme for incremental releases, and 58.v945be9f1661f has been released with the fix for this.

from github-pr-comment-build-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.