You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "airajena (via GitHub)" <gi...@apache.org> on 2026/02/06 15:25:58 UTC
[PR] FINERACT-2171: Add user names and thread replies [fineract-chat-archive]
airajena opened a new pull request, #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8
## Description
Deliver MVP chat archive pipeline (fetch, render, cursor, CI, docs) plus user display names and thread replies.
## Changes
- Slack auth, channel resolution, message fetching + pagination
- Cursor state + idempotent rendering
- Daily Markdown pages + indexes + permalinks
- CI automation + Slack scopes documentation + rate-limit retry
- User display names (users.info) and thread replies (conversations.replies)
## Testing
./gradlew test
## Related Issue
FINERACT-2171
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3865266734
> I might be missing someting. Unable to figure out.
The commit 6c95d0f290f926abe008afa73c6e2b28c019c416 needs to be signed with a GPG key, not an SSH key.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777982505
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
No worries, I don't have a preference, just wondering if it would be more standard / safer / use less code / be easier to maintain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777986778
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
Oh and I was also wondering why it was `final`. Please explain. If you don't know that's fine too, I just found it curious.
I may be missing some standard java best practice here, but I don't see much benefit in terminating the class hierarchy? I guess it's a more conservative approach. And it probably matters little to maintain extend-ability for a default visibility app class, as opposed to a public class in a library.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777982505
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
No worries, I don't have a preference, just wondering if it would be more standard / safer / use less code / be easier to maintain. Their API (at least the parts you're using) are likely stable enough it doesn't matter. And avoiding dependencies has benefits.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3865220151
All set — I re‑signed the commit CI should now pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3865424949
looks good. I'll go ahead and do the merge and we can test on `main`. And, heads up, I just learned I need to move this code to a new repository to stay GDPR compliant. Since the chat is in the Mifos slack workspace, the chat archive needs to be under a Mifos github org. The code will remain FOSS and the archive will remain public.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777017491
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
I used Java HttpClient to keep dependencies minimal and the logic transparent for MVP. If u prefers the official Slack Java SDK, I’m happy to switch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2778010654
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
+
+Required Slack scopes:
+- `channels:read` (list public channels)
+- `channels:history` (read public channel history)
+- `chat:write` (resolve permalinks)
Review Comment:
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777023471
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
Review Comment:
To create the Slack app needed for your "Step 1," follow these exact steps.
### Step 1: Create the App
1. Go to **[[api.slack.com/apps](https://api.slack.com/apps)](https://api.slack.com/apps)** in your web browser.
2. Click the **"Create New App"** button (top right).
3. Select **"From scratch"** in the popup.
4. **App Name:** Enter a name (e.g., `FineractArchiver`).
5. **Pick a workspace:** Select your free testing workspace from the dropdown.
6. Click **"Create App"**.
### Step 2: Add Permissions (Scopes)
1. In the left sidebar menu, look under "Features" and click **"OAuth & Permissions"**.
2. Scroll down to the section called **"Scopes"**.
3. Under **"Bot Token Scopes"** (NOT User Token Scopes), click "Add an OAuth Scope" and add these four exactly as listed in your instructions:
* `channels:read` (Allows viewing public channels)
* `channels:history` (Allows reading past messages)
* `users:read` (Allows translating User IDs like `U1234` to names like `Adam`)
*Note: In modern Slack apps, adding these scopes automatically creates the "Bot User" for you, so you don't need to do that separately.*
### Step 3: Install and Get Token
1. Scroll back to the very top of the **"OAuth & Permissions"** page.
2. Click the green **"Install to Workspace"** button.
3. Slack will ask for permission to access your workspace. Click **"Allow"**.
4. You will be redirected back. Look for the **"Bot User OAuth Token"**.
5. It will start with `xoxb-...`. **Copy this string.** This is the token you need for your Step 4 (`$env:SLACK_TOKEN`).
### Step 4: Invite the Bot (Crucial!)
A bot cannot read a channel unless it is a member of that channel.
1. Open your Slack workspace app (desktop or web).
2. Go to the channel you want to test (e.g., `#general` or create a new one like `#test-archive`).
3. Type this command in the chat and hit enter:
`/invite @FineractArchiver` (or whatever name you gave it).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777019351
##########
src/main/java/org/apache/fineract/chat/archive/MarkdownRenderer.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import java.time.LocalDate;
+import java.util.List;
+
+final class MarkdownRenderer {
Review Comment:
For MVP, plain string builder keeps it lightweight. If u want commonmark, I’m fine adopting it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777020173
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
+
+Required Slack scopes:
+- `channels:read` (list public channels)
+- `channels:history` (read public channel history)
+- `chat:write` (resolve permalinks)
Review Comment:
Removed chat:write to keep least-privilege. Added note: if Slack returns missing_scope, add the reported scope and reinstall.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2778005659
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
Review Comment:
> "add these four"
but three are listed below. Is it 3 or 4 scopes?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3865441882
> looks good. I'll go ahead and do the merge and we can test on `main`. And, heads up, I just learned I need to move this code to a new repository to stay GDPR compliant. Since the chat is in the Mifos slack workspace, the chat archive needs to be under a Mifos github org. The code will remain FOSS and the archive will remain public.
Thank you, looking forward in maintaining and contributing for enhancements whenever needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2778002997
##########
src/main/java/org/apache/fineract/chat/archive/MarkdownRenderer.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import java.time.LocalDate;
+import java.util.List;
+
+final class MarkdownRenderer {
Review Comment:
Sounds good. And the `final` question (same as for `SlackApiClient`)...?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2778013521
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
Review Comment:
currently its 3, removed chat:write to keep least-privilege. we can add that if we plan to send messages
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3865374112
> > I might be missing someting. Unable to figure out.
>
> The commit [6c95d0f](https://github.com/apache/fineract-chat-archive/commit/6c95d0f290f926abe008afa73c6e2b28c019c416) needs to be signed with a GPG key, not an SSH key.
Thanks, the commit is now GPG‑signed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3862951118
I rewrote the commit log messages, excluding FINERACT-2171 from each. It just takes up space. I'll add it back when I finally do the merge commit to main (and I'm going to do a traditional merge, not squash -- I like preserving these incremental commits for posterity).
I have force-pushed your branch, so you'll have to fetch and do a hard reset on your end. Sorry for not warning you first -- I don't plan on doing this often.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2776567817
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
+
+Required Slack scopes:
+- `channels:read` (list public channels)
+- `channels:history` (read public channel history)
+- `chat:write` (resolve permalinks)
Review Comment:
oh weird. Are you sure this one is required?
##########
Readme.md:
##########
@@ -1 +1,41 @@
-#fineract chat message archive
+# Fineract Chat Archive
+
+A standalone tool that will archive public Slack messages for Apache Fineract into a static site.
+
+## Local run
+
+```
+./gradlew updateChatArchive
+```
+
+Configuration:
+- File: `config/archive.properties`
+- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`)
+- Key: `output.dir` (relative path for site output, default `docs`)
+- Key: `state.dir` (relative path for cursor state, default `state`)
+- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`)
+
+Output:
+- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md`
+- Channel index: `docs/daily/<channel>/index.md`
+- Global index: `docs/index.md`
+- Thread replies are rendered below parent messages with a simple prefix.
+
+Environment:
+- `SLACK_TOKEN` (Slack Bot token)
Review Comment:
how is this created?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777986778
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
Oh and I'm also wondering why it is `final`. Please explain.
Sorry if I'm missing some standard java best practice here, but I don't see much benefit in terminating the class hierarchy? I guess it's more conservative. And it probably matters little for an app, as opposed to a library.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2778011692
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
I initially marked SlackApiClient (and MarkdownRenderer) as final because they aren’t intended to be subclassed in this small CLI app — it was a conservative “closed for inheritance” choice. There’s no strong need for it here, and it doesn’t materially improve safety or performance. Removing final has no behavior change, it just makes future extension or testing via subclassing/mocking simpler if we ever need it. I agree it likely matters little in this repo, so I removed it for clarity and flexibility.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2776506628
##########
src/main/java/org/apache/fineract/chat/archive/SlackApiClient.java:
##########
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+final class SlackApiClient {
Review Comment:
Why `final`?
And why implement your own, instead of using their official Java client?
##########
src/main/java/org/apache/fineract/chat/archive/MarkdownRenderer.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import java.time.LocalDate;
+import java.util.List;
+
+final class MarkdownRenderer {
+
+ private MarkdownRenderer() {}
+
+ static String renderDailyPage(String channelName, LocalDate date, List<Row> rows) {
+ StringBuilder builder = new StringBuilder();
+ builder.append("---\n");
+ builder.append("title: \"#").append(channelName).append(" ").append(date).append("\"\n");
+ builder.append("date: ").append(date).append('\n');
+ builder.append("channel: ").append(channelName).append('\n');
+ builder.append("---\n\n");
+
+ builder.append("| Time (UTC) | User | Message |\n");
Review Comment:
I'm not sure if a table is a great idea for formatting these, but I guess it's fine for the MVP, just to see this working. I'd be good with simplifying a bit, e.g.
```markdown
time - user - message
time - user - message
time - user - message
```
? What do you think? These would just be long lines (or multiple lines if the message spanned multiple lines). `time - user` could use the permalink.
##########
src/main/java/org/apache/fineract/chat/archive/MarkdownRenderer.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import java.time.LocalDate;
+import java.util.List;
+
+final class MarkdownRenderer {
Review Comment:
Why `final`?
Consider using `commonmark-java`. Might clean up the code a bit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "meonkeys (via GitHub)" <gi...@apache.org>.
meonkeys merged PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#issuecomment-3863575628
> I rewrote the commit log messages, excluding the string `FINERACT-2171: ` from each. It just takes up space. I'll add it to the commit log message when I merge to main (and I'm going to do a traditional merge, not squash -- I like preserving these incremental commits for posterity).
>
> I have force-pushed your branch, so you'll have to fetch and do a hard reset on your end. Sorry for not warning you first -- I don't plan on doing this often.
>
> If you'd like to add any text to the commit log messages, go right ahead.
Thanks @meonkeys — I’m committed to maintaining this after MVP and I’ll keep improving it as we go.
I synced to your force-push and will sign all new commits going forward.
Addressing your comments:
- Removed `final` from SlackApiClient and MarkdownRenderer.
- Simplified daily Markdown output to `time - user - message`, with the time linked to the permalink.
- README now explains how `SLACK_TOKEN` is created (Slack app → bot → scopes → install → `xoxb-` token).
- Removed `chat:write` from required scopes to keep least-privilege; if Slack returns `missing_scope`, we’ll add the scope it reports and re-install.
Re: Slack SDK vs custom HttpClient — I kept it minimal to reduce dependencies. I’m happy to switch to the official Slack Java client if you prefer.
Re: commonmark — I kept rendering simple for MVP, but I can adopt commonmark-java if you’d like.
Thanks again for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MVP for archiving #fineract slack chat messages [fineract-chat-archive]
Posted by "airajena (via GitHub)" <gi...@apache.org>.
airajena commented on code in PR #8:
URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777018512
##########
src/main/java/org/apache/fineract/chat/archive/MarkdownRenderer.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.chat.archive;
+
+import java.time.LocalDate;
+import java.util.List;
+
+final class MarkdownRenderer {
+
+ private MarkdownRenderer() {}
+
+ static String renderDailyPage(String channelName, LocalDate date, List<Row> rows) {
+ StringBuilder builder = new StringBuilder();
+ builder.append("---\n");
+ builder.append("title: \"#").append(channelName).append(" ").append(date).append("\"\n");
+ builder.append("date: ").append(date).append('\n');
+ builder.append("channel: ").append(channelName).append('\n');
+ builder.append("---\n\n");
+
+ builder.append("| Time (UTC) | User | Message |\n");
Review Comment:
Yes I like this one , so now I have changed to simple lines: time - user - message, with time linked to permalink.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org