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

feat: Reward Liatrians with a :fistbump: for liking or sharing posts in the #share-me-please Slack channel #680

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

RobertKelly
Copy link
Contributor

This PR adds a new feature for rewarding social shares in the Slack bot. If you provide a ✅ as a reaction to a message in the #share-me-please channel in slack, you will receive 1x :fistbump: as a thank you for liking or sharing with your network on LinkedIn.

There is also handling of the use case where someone may react multiple times to a single message by removing/re-adding their reaction. You are limited to one reward per message.

Yes this uses the "honor system" and assumes you've actually shared publicly. But since it's just 1 :fistbump:, I don't think we'll have a problem.

Details:

This pull request introduces a new feature for handling share confirmation reactions in the Slack bot, along with some refactoring and improvements to the existing recognition functionality. The most important changes include adding configuration options for the share confirmation feature, creating a new database collection, and implementing the logic to handle share confirmation reactions.

New Feature: Share Confirmation Reactions

  • config.js: Added new configuration options shareChannel and shareConfirmReaction to support the share confirmation feature.
  • database/shareReactionCollection.js: Created a new database collection shareReactionCollection to store share reactions and added indexes for efficient querying.
  • features/recognize.js: Added logic to handle share confirmation reactions and created helper functions messageReactedTo, createShareGratitude, and handleShareConfirmation. [1] [2] [3] [4]

Refactoring and Improvements

  • features/recognize.js: Refactored the existing reaction handling logic to accommodate the new share confirmation feature and improved error handling. [1] [2] [3]

@RobertKelly RobertKelly requested a review from Pactionly January 18, 2025 01:43
RobertKelly and others added 25 commits January 17, 2025 23:21
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 19.5.0 to 19.6.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.6.0/@commitlint/config-conventional)

---
updated-dependencies:
- dependency-name: "@commitlint/config-conventional"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [husky](https://github.com/typicode/husky) from 9.1.6 to 9.1.7.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v9.1.6...v9.1.7)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 9.15.0 to 9.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.15.0...v9.16.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump @slack/bolt from 3.22.0 to 4.1.1

Bumps [@slack/bolt](https://github.com/slackapi/bolt) from 3.22.0 to 4.1.1.
- [Release notes](https://github.com/slackapi/bolt/releases)
- [Commits](https://github.com/slackapi/bolt/compare/@slack/bolt@3.22.0...@slack/bolt@4.1.1)

---
updated-dependencies:
- dependency-name: "@slack/bolt"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: update middleware references to bolt-v4 versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alice Jones <21381891+Pactionly@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.21.1 to 4.21.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](expressjs/express@4.21.1...4.21.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps node from 22.11-alpine3.19 to 22.12-alpine3.19.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [liatrio/terraform-change-pr-commenter](https://github.com/liatrio/terraform-change-pr-commenter) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/liatrio/terraform-change-pr-commenter/releases)
- [Changelog](https://github.com/liatrio/terraform-change-pr-commenter/blob/main/CHANGELOG.md)
- [Commits](liatrio/terraform-change-pr-commenter@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: liatrio/terraform-change-pr-commenter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 19.5.0 to 19.6.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.6.0/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 9.16.0 to 9.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.16.0...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 19.6.0 to 19.6.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.6.1/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [mocha](https://github.com/mochajs/mocha) from 10.8.2 to 11.0.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](mochajs/mocha@v10.8.2...v11.0.1)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): pin dependencies

* chore: add specific gha tags

* chore: add specific gha tags

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alice Jones <21381891+Pactionly@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 9 commits January 18, 2025 10:30
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency chai-as-promised to v8

* chore: fix esm test module

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alice Jones <21381891+Pactionly@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants