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: store member directory profile urls on slack profile 👥 #563

Conversation

savazques
Copy link
Contributor

Description ✏️

Closes #497

Describe what this PR does.

  • Returns a list of students who have both a member profile and slack profile
  • For each student look up Slack profile by email, generate url, and set profile with newly added field
  • After each update add delay to abide by Slack rate limits

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @savazques! This was pretty solid, I just changed up the way we did rate limiting to use the RateLimiter function instead of a delay, and integrated environment variables to get the member directory base URL and the Slack field ID for the member directory URL. Rami will take a last look and then this should be good to ship! 🚀

@tomas-salgado
Copy link
Collaborator

Question for @ramiAbdou: I wonder if we should move this code into a separate file to be run as a script, since adding the member directory URL to Slack profiles is probably just a one-time thing. There's also various console logs printed as part of these functions that make sense when running a script but probably should be removed otherwise. Thoughts?

@tomas-salgado tomas-salgado added the Ready ✅ This PR is ready for a final review. label Dec 1, 2024
Copy link
Member

@ramiAbdou ramiAbdou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @savazques! I made an update so that when a new member joins a Slack workspace, it'll store their directory URL at that point (on top of the backfill script that you developed)!

@ramiAbdou
Copy link
Member

Question for @ramiAbdou: I wonder if we should move this code into a separate file to be run as a script, since adding the member directory URL to Slack profiles is probably just a one-time thing. There's also various console logs printed as part of these functions that make sense when running a script but probably should be removed otherwise. Thoughts?

Yeah I moved it to its own file but honestly we don't have a great way of running scripts currently so there's not much precedent set for that. I'm okay with the logs in the script function, but I removed the logs from the function that updates an individual profile (which is now used when a new members joins the Slack workspace)!

@ramiAbdou ramiAbdou merged commit 31e32d5 into colorstackorg:main Dec 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready ✅ This PR is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store Directory Profile URLs on Slack Profiles 🔗
3 participants