Skip to content

Added Label added trigger to plugin #121

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

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

xocasdashdash
Copy link

@xocasdashdash xocasdashdash commented Aug 6, 2023

Added support to define a labelAddedTrigger (this is something we need to support), this could be generalized to any label event if it was required, but I feel like this is the most common usecase.

Potentially this can be extended to support a regex instead of a list (I'm open to do that as it seems simple enough). This is now supported.

Opening the PR early in order to get feedback and I know that there's a CI for PRs that generates artifacts, so i could easily test this out in our jenkins instance.

Should fix part of #72 but in order to fully fix it it'd need to support regexes.

Testing done

Set it up locally on our jenkins server and added a trigger, with the following syntax:

triggers {
    issueCommentTrigger('.*test this please.*')
    labelAddedTrigger('test-label')
}

and it worked.

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

@xocasdashdash xocasdashdash marked this pull request as ready for review August 8, 2023 09:12
@xocasdashdash
Copy link
Author

@aaronwalker can you take a look into this PR? i've tested it on my jenkins and it works

@aaronwalker
Copy link
Member

@xocasdashdash thanks for the contribution!!!!!! I will review this PR and look to get it merged. In meantime can you also test the incrementals build for this PR https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/pipeline-github/2.8-151.33e86903fbb8/

@xocasdashdash
Copy link
Author

@aaronwalker did that already and it's working! :)

@aaronwalker aaronwalker merged commit 1bb03bf into jenkinsci:master Aug 28, 2023
@xocasdashdash xocasdashdash deleted the feature/add-label-trigger branch November 20, 2023 11:55
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.

2 participants