1. Query a Jira task to get a list of files changed against the task (with their version/hash).
You can use cURL to access Stash's REST api to retrieve the commits that are linked to the JIRA issue. The endpoint you need is /rest/jira/latest/issues/{issueKey}/commits (documentation is here). Each of the returned commits includes a summary of the changes (files added/modified/deleted).
2. Get a copy of a particular file from stash (it will be from the list create above).
From the results of the query described above you can piece together the URL to download a particular version of the file:
Note the &raw at the end. This is needed to get the raw contents instead of the HTML marked up version of the file.
For item 1, I don't know what query means exactly but if you integrate JIRA with Stash, you can view the changelist in the issue itself (https://confluence.atlassian.com/display/STASH/JIRA+integration).
And with that, you should be able to go from JIRA to Stash to get the file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.