끌어 오기 요청 설명에 유효한 Jira 티켓이 포함되어 있으면 여러 가지 사항을 확인하는 작은 플러그인이 있습니다.Stash와 Jira 사이의 액세스 문제
다음 코드는 Stash 3.2.4에서 테스트했을 때 제대로 작동했지만 이후에 Stash를 3.3.0으로 업그레이드했을 때 중단되었습니다 (플러그인이 아직 개발 중이므로 직접적인 원인이 아닐 수도 있음).
public JiraServiceImpl(ApplicationLinkService applicationLinkService)
{
this.applicationLinkService = applicationLinkService;
}
private ApplicationLink getJiraApplicationLink()
{
ApplicationLink applicationLink = applicationLinkService.getPrimaryApplicationLink(JiraApplicationType.class);
if (applicationLink == null)
{
throw new IllegalStateException("Primary JIRA application link does not exist!");
}
return applicationLink;
}
public boolean doesIssueExist(IssueKey issueKey) throws CredentialsRequiredException, ResponseException
{
checkNotNull(issueKey, "issueKey is null");
final ApplicationLinkRequestFactory fac = getJiraApplicationLink().createAuthenticatedRequestFactory();
ApplicationLinkRequest req = fac.createRequest(Request.MethodType.GET, "/rest/api/2/issue/"+issueKey.getFullyQualifiedIssueKey());
return req.execute(new ApplicationLinkResponseHandler<Boolean>()
{
@Override
public Boolean credentialsRequired(Response response) throws ResponseException
{
throw new ResponseException(new CredentialsRequiredException(fac, "Token is invalid"));
}
@Override
public Boolean handle(Response response) throws ResponseException
{
return response.isSuccessful();
}
});
}
"원격 리소스에 대해 인증 된 액세스 토큰이 없습니다."라는 메시지와 함께 예외가 발생합니다.
Stash 관리자 권한이 없으며 3.2.4로 돌아갈 수 없습니다. 응용 프로그램 링크가 문제 였다고 다시 생각했지만 문제는 아닙니다. 테스트를 통해 관리자 권한이있는 사용자에게는 작동하지만 일반 사용자에게는 적합하지 않은 것으로 나타났습니다.
문제를 해결하기 위해 변경할 수있는 것이 있습니까?
나는 거의 내가 여기 물었을 때 거의 그랬다. 그들의 대답은 개발 문제를 다루지 않고 답을 구하도록 격려했습니다 .atlassian.com. – Amaranth