Skip to content

Commit

Permalink
Adoption to Jira 10.0.0-m0009 (#397)
Browse files Browse the repository at this point in the history
Co-authored-by: Yevhen Hrytsai <[email protected]>
  • Loading branch information
yevhenhr and Yevhen Hrytsai authored Aug 7, 2024
1 parent 8dba978 commit 03fbbed
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 39 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ jobs:
name: Jira
runs-on: ubuntu-20.04
timeout-minutes: 30
# Disabled until Jira version is available
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')) && false
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-jira')
needs: unit-tests
strategy:
matrix:
java-version: [17]
jira-version: [10.0.0]
jira-version: [10.0.0-m0009]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
19 changes: 0 additions & 19 deletions bin/build/prepare-matrices.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@
<!-- Give Java more heap to make Jira faster -->
<jvmArgs>${jvm17.opens} -Xmx2g</jvmArgs>

<banningExcludes>
<exclude>com.atlassian.security:atlassian-secure-random</exclude>
<exclude>commons-codec:commons-codec</exclude>
<exclude>com.google.code.gson:gson</exclude>
</banningExcludes>

<pluginArtifacts>
<pluginArtifact>
<groupId>com.atlassian.jira</groupId>
Expand Down Expand Up @@ -640,7 +646,7 @@
</build>

<properties>
<jira.amps.version>8.10.4</jira.amps.version>
<jira.amps.version>9.0.3</jira.amps.version>
<project.root.directory>${project.basedir}/../..</project.root.directory>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.SSSZ</maven.build.timestamp.format>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private String getProjectsFieldHtml() {
.build();

// We pass new JiraWebActionSupport() so the template has access to i18n
final JiraWebActionSupport fakeAction = new JiraWebActionSupport();
final JiraWebActionSupport fakeAction = new JiraWebActionSupport() {};
ActionContext.getValueStack().pushValue(fakeAction);
return projectField.getCreateHtml(null, operationContext, fakeAction, null, displayParameters);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.atlassian.jira.plugins.slack.web.panels;

import com.atlassian.plugin.web.model.WebPanel;
import com.atlassian.plugin.web.api.model.WebPanel;
import com.atlassian.webresource.api.assembler.PageBuilderService;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,4 +790,9 @@
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</servlet-filter>

<velocity-allowlist key="velocity-allowlist-slack-plugin">
<method>com.atlassian.jira.plugins.slack.spi.impl.JiraSlackPluginResourceProvider#getPluginKey()</method>
</velocity-allowlist>

</atlassian-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import static org.mockito.Mockito.when;

@PrepareForTest({JqlIssueFilter.class, JqlQueryBuilder.class})
@PowerMockIgnore("javax.*")
@PowerMockIgnore({"javax.*", "org.xml.*", "org.w3c.*"})
@RunWith(PowerMockRunner.class)
public class JqlIssueFilterTest {
@Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

Expand All @@ -35,6 +36,7 @@
import static org.junit.Assert.assertThat;

@PrepareForTest({DefaultTaskBuilder.class, SendNotificationTask.class})
@PowerMockIgnore({"javax.*", "org.xml.*", "org.w3c.*"})
@RunWith(PowerMockRunner.class)
public class DefaultTaskBuilderTest {
@Mock
Expand Down
6 changes: 3 additions & 3 deletions jira-slack-server-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<aui.version>5.1.3</aui.version>

<!-- this is the version we will run integration tests against -->
<jira.version>10.0.0-QR-20240423065758</jira.version>
<testkit.version>8.2.2</testkit.version>
<jira.version>10.0.0-m0009</jira.version>
<testkit.version>10.0.3</testkit.version>
<jira.test.unit.version>${jira.version}</jira.test.unit.version>

<!-- This is the version the plugin is compiled against -->
<jira.compile.version>10.0.0-QR-20240423065758</jira.compile.version>
<jira.compile.version>10.0.0-m0009</jira.compile.version>

<jira.pageobjects.version>${jira.version}</jira.pageobjects.version>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.atlassian.plugins.slack.rest;

import com.atlassian.annotations.security.UnrestrictedAccess;
import org.apache.commons.lang3.StringUtils;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
Expand All @@ -13,17 +13,14 @@

import static com.github.seratch.jslack.app_backend.SlackSignature.HeaderNames.X_SLACK_SIGNATURE;

@UnrestrictedAccess
public class RequestCachingServletFilter implements Filter {
private final RequestHolder requestHolder;

public RequestCachingServletFilter(final RequestHolder requestHolder) {
this.requestHolder = requestHolder;
}

@Override
public void init(FilterConfig filterConfig) throws ServletException {
}

@Override
public void doFilter(final ServletRequest request,
final ServletResponse response,
Expand All @@ -40,7 +37,4 @@ public void doFilter(final ServletRequest request,
chain.doFilter(processedRequest, response);
}

@Override
public void destroy() {
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#* @vtlvariable name="webResourceManager" type="com.atlassian.plugin.webresource.api.WebResourceManager" *#
#* @vtlvariable name="webResourceManager" type="com.atlassian.webresource.api.WebResourceManager" *#
#* @vtlvariable name="pageBuilderService" type="com.atlassian.webresource.api.assembler.PageBuilderService" *#
#* @vtlvariable name="webInterfaceManager" type="com.atlassian.plugin.web.WebInterfaceManager" *#
#* @vtlvariable name="i18n" type="com.atlassian.sal.api.message.I18nResolver" *#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#* @vtlvariable name="webResourceManager" type="com.atlassian.plugin.webresource.api.WebResourceManager" *#
#* @vtlvariable name="webResourceManager" type="com.atlassian.webresource.api.WebResourceManager" *#
#* @vtlvariable name="pageBuilderService" type="com.atlassian.webresource.api.assembler.PageBuilderService" *#
#* @vtlvariable name="webInterfaceManager" type="com.atlassian.plugin.web.WebInterfaceManager" *#
#* @vtlvariable name="i18n" type="com.atlassian.sal.api.message.I18nResolver" *#
Expand Down

0 comments on commit 03fbbed

Please sign in to comment.