Skip to content

Commit a2a94b2

Browse files
authored
Merge branch 'main' into add_title_canvas_response
2 parents 427a68f + b8152df commit a2a94b2

File tree

284 files changed

+9405
-1333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+9405
-1333
lines changed

.claude/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CLAUDE.local.md
2+
settings.local.json
3+
worktrees/
4+
plans/

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@../AGENTS.md

.claude/settings.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(./mvnw:*)",
5+
"Bash(./scripts/check_dependency_updates.sh:*)",
6+
"Bash(./scripts/install_local.sh:*)",
7+
"Bash(./scripts/run_all_bolt_tests.sh:*)",
8+
"Bash(./scripts/run_all_client_tests.sh:*)",
9+
"Bash(./scripts/run_no_prep_tests.sh:*)",
10+
"Bash(./scripts/set_version.sh:*)",
11+
"Bash(gh issue view:*)",
12+
"Bash(gh label list:*)",
13+
"Bash(gh pr checks:*)",
14+
"Bash(gh pr diff:*)",
15+
"Bash(gh pr list:*)",
16+
"Bash(gh pr status:*)",
17+
"Bash(gh pr update-branch:*)",
18+
"Bash(gh pr view:*)",
19+
"Bash(gh search code:*)",
20+
"Bash(git diff:*)",
21+
"Bash(git grep:*)",
22+
"Bash(git log:*)",
23+
"Bash(git show:*)",
24+
"Bash(git status:*)",
25+
"Bash(grep:*)",
26+
"Bash(ls:*)",
27+
"Bash(tree:*)",
28+
"WebFetch(domain:central.sonatype.com)",
29+
"WebFetch(domain:docs.slack.dev)",
30+
"WebFetch(domain:github.com)"
31+
]
32+
}
33+
}

.github/CODEOWNERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Salesforce Open Source project configuration
2+
# Learn more: https://github.com/salesforce/oss-template
3+
#ECCN:Open Source
4+
#GUSINFO:Open Source,Open Source Workflow
5+
6+
# @slackapi/slack-platform-java
7+
# are code reviewers for all changes in this repo.
8+
* @slackapi/slack-platform-java
9+
10+
# @slackapi/developer-education
11+
# are code reviewers for changes in the `/docs` directory.
12+
/docs/ @slackapi/developer-education

.github/maintainers_guide.md

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Maintaining this project requires installing [OpenJDK](https://openjdk.java.net/
1010

1111
### Testing
1212

13-
This project has tests for individual packages inside of each's respective `src/test/java` directory. All the tests under `test_locally` package are executed in every single GitHub Actions CI build as below.
13+
This project has tests for individual packages inside each's respective `src/test/java` directory. All the tests under `test_locally` package are executed in every single GitHub Actions CI build as below.
1414

1515
```bash
1616
./scripts/run_no_prep_tests.sh
@@ -76,9 +76,33 @@ By installing App(2) and App(3), you get the followings. Set them as env variabl
7676
|SLACK_SDK_TEST_GRID_SHARED_CHANNEL_ID|A shared channel's ID `SLACK_SDK_TEST_GRID_WORKSPACE_ADMIN_USER_TOKEN` can manage.|
7777
|SLACK_SDK_TEST_EMAIL_ADDRESS|An email address to invite.|
7878

79+
### Installing JAR files locally for development
80+
81+
To use the JAR files from each subproject in your local development environment, you can install them to your local Maven repository:
82+
83+
1. Build and install all modules locally:
84+
* Run `scripts/install_local.sh`
85+
* Note: This command skips running unit tests for faster installation
86+
2. Use in your project:
87+
Once installed locally, you can reference these artifacts in your project's `pom.xml`:
88+
89+
```xml
90+
<dependency>
91+
<groupId>com.slack.api</groupId>
92+
<artifactId>bolt</artifactId>
93+
<version>1.0.1-SNAPSHOT</version>
94+
</dependency>
95+
96+
<dependency>
97+
<groupId>com.slack.api</groupId>
98+
<artifactId>slack-api-client</artifactId>
99+
<version>1.0.1-SNAPSHOT</version>
100+
</dependency>
101+
```
102+
79103
### Generating Documentation
80104

81-
Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/README.md) for details on editing documentation.
105+
Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/README.md) for details on editing documentation.
82106

83107
### Releasing
84108

@@ -88,19 +112,24 @@ Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/
88112
* Make sure you've set up your key https://central.sonatype.org/publish/requirements/gpg/
89113
* Make sure the account you are using has the permission to make releases [under com.slack groupId](https://central.sonatype.com/publishing/com.slack/users)
90114

91-
Place `$HOME/.m2/settings.xml` with your Sonatype account information.
115+
Place `$HOME/.m2/settings.xml` with your Sonatype account information.
92116
* Generate user token: https://central.sonatype.org/publish/generate-portal-token/
93117
* Set the user token id/password: https://central.sonatype.org/publish/publish-portal-maven/#credentials
94118

95119
```xml
96120
<settings>
97121
<localRepository>/${your-home-dir}/.m2/repository</localRepository>
98122
<servers>
99-
<server>
100-
<username>${your-username}</username>
101-
<password>${your-password}</password>
102-
<id>central</id>
103-
</server>
123+
<server>
124+
<id>central</id>
125+
<username>${your-username}</username>
126+
<password>${your-password}</password>
127+
</server>
128+
<server>
129+
<id>central-snapshots</id>
130+
<username>${your-username}</username>
131+
<password>${your-password}</password>
132+
</server>
104133
</servers>
105134
<pluginGroups>
106135
<pluginGroup>org.apache.maven.plugins</pluginGroup>
@@ -109,7 +138,28 @@ Place `$HOME/.m2/settings.xml` with your Sonatype account information.
109138
</settings>
110139
```
111140

112-
#### Operations
141+
#### Snapshot Release
142+
143+
Snapshot releases are intended for developers to make pre-release versions of their projects available for testing.
144+
To learn more about snapshot releases in maven central repository check out [publish-portal-snapshots](https://central.sonatype.org/publish/publish-portal-snapshots/)
145+
146+
* From the upstream repository
147+
* Preparation
148+
* `git switch main && git pull origin main` (or the branch you want to release from)
149+
* Make sure there are no build failures at https://github.com/slackapi/java-slack-sdk/actions
150+
* Set a new version
151+
* It is **critical** that the version ends with `-SNAPSHOT`. This is how [central-publishing-maven-plugin](https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-with-the-central-publishing-maven-plugin) automatically recognizes snapshot releases and uploads them the right location.
152+
* If you don't have `gnu-sed`, check out [Prerequisites](#prerequisites)
153+
* Run `scripts/set_version.sh (the version)` (e.g., `scripts/set_version.sh 1.0.0-SNAPSHOT`)
154+
* Ship the libraries
155+
* Switch to **JDK 17** to publish all modules (on macOS, you can run `export JAVA_HOME=$(/usr/libexec/java_home -v 17)` for it)
156+
* Run `scripts/release.sh` (it takes a bit long)
157+
* (If you encounter an error, log in https://oss.sonatype.org/ to check detailed information)
158+
* No need to create a GitHub Release, since this is intended for developers to make pre-release versions of their projects.
159+
* `-SNAPSHOT` versions are intended to be overwritten.
160+
* This enables developers to work with the latest version of a library without needing to update their dependencies repeatedly.
161+
162+
#### Stable Release
113163

114164
* From the upstream repository
115165
* Preparation

.github/workflows/ci-build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 20
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
java-version: ["8", "14", "17"]
18+
permissions:
19+
contents: read
20+
steps:
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
24+
- name: Install JDK ${{ matrix.java-version }}
25+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
26+
with:
27+
java-version: ${{ matrix.java-version }}
28+
distribution: "adopt"
29+
- name: Cache Maven repository
30+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
31+
with:
32+
path: ~/.m2/repository
33+
key: maven-${{ runner.os }}-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: |
35+
maven-${{ runner.os }}-${{ matrix.java-version }}-
36+
- name: Compile
37+
run: ./scripts/run_no_prep_tests.sh clean test-compile
38+
env:
39+
CI_ARGS: "--batch-mode"
40+
MAVEN_OPTS: "-Xmx10g -Xms1g"
41+
- name: Run tests
42+
run: ./scripts/run_no_prep_tests.sh test
43+
env:
44+
CI_ARGS: "--batch-mode"
45+
SKIP_UNSTABLE_TESTS: 1
46+
- name: Upload test results to Codecov
47+
if: ${{ !cancelled() && hashFiles('**/target/surefire-reports/TEST-*.xml') != '' }}
48+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
49+
with:
50+
directory: .
51+
files: "**/target/surefire-reports/TEST-*.xml"
52+
fail_ci_if_error: true
53+
flags: jdk-${{ matrix.java-version }}
54+
report_type: test_results
55+
token: ${{ secrets.CODECOV_TOKEN }}
56+
- name: Upload coverage to Codecov
57+
if: ${{ !cancelled() && startsWith(matrix.java-version, '14') && hashFiles('**/target/site/jacoco/jacoco.xml') != '' }}
58+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
59+
with:
60+
files: "**/target/site/jacoco/jacoco.xml"
61+
flags: jdk-${{ matrix.java-version }}
62+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/dependencies.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Merge updates to dependencies
2+
on:
3+
pull_request:
4+
jobs:
5+
dependabot:
6+
name: "@dependabot"
7+
if: github.event.pull_request.user.login == 'dependabot[bot]'
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
steps:
13+
- name: Collect metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve
19+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
20+
run: gh pr review --approve "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
24+
- name: Automerge
25+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
26+
run: gh pr merge --auto --squash "$PR_URL"
27+
env:
28+
PR_URL: ${{ github.event.pull_request.html_url }}
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/triage-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
issues: write
1717
pull-requests: write
1818
steps:
19-
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
19+
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1
2020
with:
2121
days-before-issue-stale: 30
2222
days-before-issue-close: 10

.github/workflows/unit-tests-jdk-14.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/unit-tests-jdk-17.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)