I am trying to get a list of changes between two commits using the HistoryService's getChangesetBetween() function: https://developer.atlassian.com/static/javadoc/stash/2.4.1/api/reference/com/atlassian/stash/history/HistoryService.html#getChangesetsBetween%28com.atlassian.stash.content.ChangesetsBetweenRequest,%20com.atlassian.stash.util.PageRequest%29
Following the example in the documentation, I am trying to create a ChagesetsBetweenRequest object, but am getting an error when I try to import it.
/home/ben/git/stash_plugin/stash-example-async-post-receive-config/src/main/java/com/mycompany/example/plugin/myhook/MyRepositoryHook.java:[9,34] cannot find symbol symbol : class ChangesetsBetweenRequest location: package com.atlassian.stash.content /home/ben/git/stash_plugin/stash-example-async-post-receive-config/src/main/java/com/mycompany/example/plugin/myhook/MyRepositoryHook.java:[10,59] package com.atlassian.stash.content.ChangesetsBetweenRequest does not exist
I've also tried importing all of com.atlassian.stash.content.*, but this does not help.
You should definitely be using the same version as your production instance for stash.version. The data version is just the initial data set and doesn't matter so much because we update the DB schema regardless (but it's probably just as easy to keep them the same).
Let me know if run into any more problems.
By the way, I'm developing on a local development machine, not on our production server. I'm testing my plugin with the `atlas-run` command. Here is the output from `atlas-version` for context.
% atlas-version ATLAS Version: 4.2.5 ATLAS Home: /opt/atlassian/plugin-sdk ATLAS Scripts: /opt/atlassian/plugin-sdk/bin ATLAS Maven Home: /opt/atlassian/plugin-sdk/apache-maven -------- Executing: /opt/atlassian/plugin-sdk/apache-maven/bin/mvn --version -gs /opt/atlassian/plugin-sdk/apache-maven/conf/settings.xml Apache Maven 2.1.0 (r755702; 2009-03-18 14:10:27-0500) Java version: 1.6.0_45 Java home: /opt/sun-java6/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "3.10.10-1-arch" arch: "amd64" Family: "unix"
I just noticed that at the bottom of the Stash pages it says version 2.2.0, but it seems the API documentation and the production server we are running are both 2.4.1.
I've tried specifying the version of stash with the following command (I also tried the same with `atlas-run-standalone`, but got errors when I tried to access the page.).
% atlas-clean % atlas-run --product stash --version 2.4.1
This got the displayed stash version to be correct, but I am still hitting the same "cannot find symbol" error. Perhaps I need to also somehow specify the version of the API it should compile my code with...?
Of course. Here is the java file: https://gist.github.com/BenBergman/57c2caefaf670193d0a7
This plugin is based on one of the Atlassian examples on bitbucket: https://bitbucket.org/atlassian/stash-example-async-post-receive-config
I noticed that at the end of the file there are two places where it states stash [data] version 2.2.0. I changed them both to 2.4.1 and things seem to be working better now. Let me know if I shouldn't have updated them both.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot