Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
taskId: results.originalTaskId,
task: results.originalTask,
input: {},
staticActionVariables: results.staticActionVariables,
}).then(function () {
$scope.$apply(thNotify.send(`Request sent to backfill job via actions.json (${actionTaskId})`, 'success'));
}, function (e) {
// The full message is too large to fit in a Treeherder
// notification box.
$scope.$apply(thNotify.send(formatTaskclusterError(e), 'danger', { sticky: true }));
});
}
}
// Otherwise we'll figure things out with actions.yml
const queue = new Queue({ credentialAgent: thTaskcluster.getAgent() });
// buildUrl is documented at
// https://github.com/taskcluster/taskcluster-client-web#construct-urls
// It is necessary here because getLatestArtifact assumes it is getting back
// JSON as a reponse due to how the client library is constructed. Since this
// result is yml, we'll fetch it manually using $http and can use the url
// returned by this method.
const url = queue.buildUrl(
queue.getLatestArtifact,
decisionTaskId,
'public/action.yml'
);
$http.get(url).then(function (resp) {
let action = resp.data;
const template = $interpolate(action);
action = template({