Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward merge to master #384

Merged
merged 17 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ccfdd9f
Re-enable bitbucket integration tests
ssu2-atl May 29, 2024
0a42a42
Update Bitbucket, amps, platform and Java version for Bitbucket
ssu2-atl May 27, 2024
be10705
Use provided jakarta.inject instead of javax.inject for Bitbucket
ssu2-atl May 27, 2024
73601d1
Test with Bitbucket AMPS 8.2.2
ssu2-atl May 29, 2024
fbde1dc
Replace com.atlassian.util.concurrent with io.atlassian.util.concurrent
ssu2-atl May 29, 2024
1706a2c
Fixed failing bitbucket integration tests - Delete unused SlackLinkU…
djansons-atlassian Jun 2, 2024
5e67037
Bump bitbucket amps to 8.16.0
djansons-atlassian Jun 3, 2024
68b2311
Allow banned dependencies after bumping amps version
djansons-atlassian Jun 3, 2024
ee6d7e5
Merge pull request #373 from atlassian-labs/bitbucket-use-9.0.0-eap03…
djansons-atlassian Jun 5, 2024
9c46b69
Use JDK 17 in the release job and set milestone version for bitbucket…
Jun 12, 2024
e298636
Merge pull request #375 from atlassian-labs/jdk-17-release-and-bb-mil…
yevhenhr Jun 12, 2024
3f28f7b
[skip ci] prepare release bitbucket-slack-server-integration-plugin-5…
Jun 12, 2024
00384cf
[skip ci] prepare for next development iteration
Jun 12, 2024
1344388
Set GITHUB_REF variable in release-check workflow
Jul 5, 2024
e78ae4f
Merge pull request #383 from atlassian-labs/issue/set-github-ref-var
yevhenhr Jul 9, 2024
c41ff32
Remove milestone version in bitbucket plugin
yevhenhr Jul 10, 2024
060425a
Merge pull request #385 from atlassian-labs/remove-milestone-in-bitbu…
yevhenhr Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ jobs:
jira-it-matrix: ${{ steps.set-matrix.outputs.jira-it-matrix }}
confluence-it-matrix: ${{ steps.set-matrix.outputs.confluence-it-matrix }}
bitbucket-it-matrix: ${{ steps.set-matrix.outputs.bitbucket-it-matrix }}
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
# TODO: Remove these flags when new major jira (10.x) is released
skip-jira-its: ${{ steps.set-matrix.outputs.skip-jira-its }}
skip-bitbucket-its: ${{ steps.set-matrix.outputs.skip-bitbucket-its }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -148,7 +147,7 @@ jobs:
name: Bitbucket
runs-on: ubuntu-20.04
timeout-minutes: 30
if: (github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')) && !needs.prepare.outputs.skip-bitbucket-its
if: github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'integration-tests-bitbucket')
needs: [prepare, unit-tests]
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.bitbucket-it-matrix) }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ jobs:
PRODUCT="jira" \
GH_USER=${{ secrets.GH_USER }} \
GH_TOKEN=${{ secrets.GH_TOKEN }} \
GITHUB_REF=${{ matrix.branch }} \
./run-product-release-check.sh
- working-directory: bin/release-check
run: |
PRODUCT="confluence" \
GH_USER=${{ secrets.GH_USER }} \
GH_TOKEN=${{ secrets.GH_TOKEN }} \
GITHUB_REF=${{ matrix.branch }} \
./run-product-release-check.sh
- working-directory: bin/release-check
run: |
PRODUCT="bitbucket" \
GH_USER=${{ secrets.GH_USER }} \
GH_TOKEN=${{ secrets.GH_TOKEN }} \
GITHUB_REF=${{ matrix.branch }} \
./run-product-release-check.sh
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
- name: Populate plugin module by selected product
run: bin/build/populate-plugin-by-product.sh ${{ github.event.inputs.product }}
- name: Install JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
java-version: 17
distribution: adopt
- name: Log Maven settings.xml
run: cat $HOME/.m2/settings.xml
- name: Install Atlassian Plugin SDK
Expand Down
2 changes: 1 addition & 1 deletion bin/build/java-product-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"bitbucket-it": {
"java-version": ["17"],
"bitbucket-version": ["9.0.0"]
"bitbucket-version": ["9.0.0-eap03"]
}
},
"old": {
Expand Down
3 changes: 1 addition & 2 deletions bin/build/prepare-matrices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ matrix_file='bin/build/java-product-matrix.json'
pl_common_version=$(. bin/build/get-plugin-major-version.sh common)
if [ $pl_common_version -gt 1 ]; then
matrix_key='current'
# TODO: Remove these flags when new major jira (10.x) and bitbucket (9.x) are released
# TODO: Remove these flags when new major jira (10.x) is released
echo "skip-jira-its=true" >> $GITHUB_OUTPUT
echo "skip-bitbucket-its=true" >> $GITHUB_OUTPUT
else
matrix_key='old'
fi
Expand Down
21 changes: 13 additions & 8 deletions bitbucket-slack-server-integration-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@

<!-- product properties -->
<plugin.key>${project.groupId}.${project.artifactId}</plugin.key>
<bitbucket.api.version>9.0.0-plat-7-m20</bitbucket.api.version>
<bitbucket.version>9.0.0-plat-7-m20</bitbucket.version>
<bitbucket.api.version>9.0.0-eap03</bitbucket.api.version>
<bitbucket.version>9.0.0-eap03</bitbucket.version>
<bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
<bitbucket.amps.version>8.2.2</bitbucket.amps.version>
<platform.version>7.0.0</platform.version>
<bitbucket.amps.version>8.16.1</bitbucket.amps.version>
<platform.version>7.0.5</platform.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -174,9 +174,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -223,7 +222,7 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<groupId>io.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -482,6 +481,12 @@
<jvmArgs>${jvm17.opens} -Djdbc.url=jdbc:h2:${project.build.directory}/bitbucket/home/shared/data/db;DB_CLOSE_DELAY=-1;AUTO_SERVER=TRUE</jvmArgs>
<jvmDebugPort>5007</jvmDebugPort>

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

<systemPropertyVariables>
<plugin.resource.directories>
${project.basedir}/../slack-server-integration-common/src/main/resources,
Expand Down
4 changes: 2 additions & 2 deletions bitbucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Examples:
./bitbucket.sh clean run -> cleans all compiled files but the Bitbucket home directory, compiles everything, and runs Bitbucket in development mode
"

# check java 8
# check java 17
javaVersion=`java -version 2>&1 | head -n 1 | cut -d\" -f 2`
javaCompilerVersion=`javac -version 2>&1 | head -n 1 | cut -d\" -f 2`
[[ "$javaVersion" != "1.8."* && "$javaVersion" != "11."* || "$javaCompilerVersion" != *"1.8."* && "$javaCompilerVersion" != *"11."* ]] && echo "Java 8 expected" && exit 1
[[ "$javaVersion" != "17."* || "$javaCompilerVersion" != *"17."* ]] && echo "Java 17 expected" && exit 1

# compute parameters
purge=$([[ "$*" == *"purge"* ]] && echo "yes" || echo "no")
Expand Down
2 changes: 1 addition & 1 deletion slack-server-integration-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<groupId>io.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import com.atlassian.plugins.slack.link.SlackLinkManager;
import com.atlassian.plugins.slack.user.SlackUserManager;
import com.atlassian.sal.api.user.UserManager;
import com.atlassian.util.concurrent.LazyReference;
import com.github.seratch.jslack.Slack;
import com.github.seratch.jslack.common.http.SlackHttpClient;
import io.atlassian.fugue.Either;
import io.atlassian.util.concurrent.LazyReference;
import lombok.extern.slf4j.Slf4j;
import okhttp3.Authenticator;
import okhttp3.Challenge;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.atlassian.plugins.slack.api.client;

import com.atlassian.util.concurrent.ThreadFactories;
import io.atlassian.util.concurrent.ThreadFactories;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
Expand All @@ -10,7 +10,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import static com.atlassian.util.concurrent.ThreadFactories.Type.DAEMON;
import static io.atlassian.util.concurrent.ThreadFactories.Type.DAEMON;

@Component
public class ExecutorServiceHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.atlassian.plugin.module.Element;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugins.slack.api.notification.SlackNotificationContext;
import com.atlassian.util.concurrent.ResettableLazyReference;
import io.atlassian.util.concurrent.ResettableLazyReference;

public class SlackNotificationContextDescriptor extends AbstractModuleDescriptor<SlackNotificationContext> {
private String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.atlassian.plugin.module.Element;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugins.slack.api.notification.SlackNotification;
import com.atlassian.util.concurrent.ResettableLazyReference;
import io.atlassian.util.concurrent.ResettableLazyReference;

public class SlackNotificationDescriptor extends AbstractModuleDescriptor<SlackNotification<Object>> {
private String value;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.atlassian.soy.renderer.SoyServerFunction;

import javax.ws.rs.core.UriBuilder;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.Set;

Expand All @@ -22,7 +24,8 @@ public Set<Integer> validArgSizes() {

@Override
public String apply(final Object... args) {
return UriBuilder.fromUri(args[0].toString())
String decodedUri = URLDecoder.decode(args[0].toString(), StandardCharsets.UTF_8);
return UriBuilder.fromUri(decodedUri)
.replaceQueryParam(args[1].toString(), args[2].toString())
.build()
.toString();
Expand Down
Loading