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

expose comment and author as environment variables #65

Merged
merged 7 commits into from
Mar 6, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Jul 19, 2019

Highlights

  • Expose GitHub comment and author as environment variables.
    • GITHUB_COMMENT
    • GITHUB_COMMENT_AUTHOR

Tests

image

Tasks

  • UTs
  • UI Tests

@aaronjwhiteside
Copy link

Is this intended for comment triggers?

@v1v
Copy link
Member Author

v1v commented Jul 22, 2019

yes, it's intended for the comment triggers, I'm still working on the UTs for increasing the code coverage.

@v1v v1v marked this pull request as ready for review August 2, 2019 14:11
@v1v
Copy link
Member Author

v1v commented Aug 2, 2019

I've tried to add some UTs but no clue how to test it out :(. Happy to get some assistance if it's required, as the only tests I've have done so far where manual to validate the env variables were created on the fly when the issue commit message matched the regex

@aaronjwhiteside
Copy link

aaronjwhiteside commented Mar 5, 2020

So I think environment variables are fine and all, but what would be really cool is exposing the comment as a global object, much like the pullRequest object. Just a thought, we can leave that for another PR..

@v1v thanks for this!

If you update README.md to document this, I'll merge it soon...

@v1v
Copy link
Member Author

v1v commented Mar 5, 2020

Done! I also verified, once again, that everything works as expected.

@aaronjwhiteside. I think we are now good to go :)

@aaronjwhiteside aaronjwhiteside merged commit aeb1116 into jenkinsci:master Mar 6, 2020
@v1v v1v deleted the expose/variable branch March 8, 2020 20:09
@tikolakin
Copy link

for some reason it doesn't work for me
I have correct plugging version running
is it supposed to work with both, declarative and scripted pipelines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants