Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/stash-pullrequest-builder-plugin
  Commit: eb6dbcb43c7f46ccd4aa5a5bf2230e9ef48c0cae
      
https://github.com/jenkinsci/stash-pullrequest-builder-plugin/commit/eb6dbcb43c7f46ccd4aa5a5bf2230e9ef48c0cae
  Author: Pavel Roskin <plros...@gmail.com>
  Date:   2019-05-06 (Mon, 06 May 2019)

  Changed paths:
    M 
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashPullRequestsBuilder.java
    M 
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashRepository.java

  Log Message:
  -----------
  StashRepository: Change constructor to get needed objects directly

The StashPullRequestsBuilder object is not needed, but the project and
the trigger are used a lot, so pass them to the constructor. Annotate the
constructor arguments with @Nonnull.

No need to defer setting trigger until the init() call, it is not going
to change.

Passing the needed objects directly simplifies mock object injection in
unit tests.


  Commit: cc2f4d712837c80a26a09a5f289cbe98605f273d
      
https://github.com/jenkinsci/stash-pullrequest-builder-plugin/commit/cc2f4d712837c80a26a09a5f289cbe98605f273d
  Author: Pavel Roskin <plros...@gmail.com>
  Date:   2019-05-06 (Mon, 06 May 2019)

  Changed paths:
    M pom.xml
    M 
src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashRepository.java
    A 
src/test/java/stashpullrequestbuilder/stashpullrequestbuilder/StashRepositoryTest.java

  Log Message:
  -----------
  StashRepository: Only consider pull requests in the "OPEN" state

Pull requests in other states were wrongly considered buildable.
Fortunately, they are not returned but Stash. Still, the check was in the
code, and it was not working as intended.

Add Mockito based unit tests. Add a constructor that takes the
StashApiClient object, since "new" cannot be mocked.


Compare: 
https://github.com/jenkinsci/stash-pullrequest-builder-plugin/compare/b5fc46ad61c4...cc2f4d712837

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to