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

Adjust jobs moderation bot #335

Merged
merged 7 commits into from
Nov 29, 2023
Merged

Adjust jobs moderation bot #335

merged 7 commits into from
Nov 29, 2023

Conversation

vcarl
Copy link
Member

@vcarl vcarl commented Nov 27, 2023

  • Require links in HIRING posts
  • Double the lifespan of a FORHIRE post to 60 hours
  • Don't delete edited messages. If we hit problems with formatting evasion, we'll need to reevaluate. Edited posts still get flagged, just not deleted.
  • Small copy adjustments on validation failure thread creation
  • Small adjustments to support test environment

@ghost
Copy link

ghost commented Nov 27, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link

what-the-diff bot commented Nov 27, 2023

PR Summary

  • Commented out a delete message line
    In src/features/jobs-moderation.ts, a piece of code that previously deleted a message has been commented out.

  • Improved job mod helpers
    In src/features/jobs-moderation/job-mod-helpers.ts, several updates were made. An import for a feature named PostFailureLinkRequired was added, as well as a new function to check post failures related to the requirement of a link.

  • New Tests Added
    Added a new file src/features/jobs-moderation/validate.test.ts that contains a whole test suite for the function 'links'. This function and its test cases within the suite help verify the correct operation of link-related aspects in job posts.

  • Validation improvements
    File src/features/jobs-moderation/validate.ts has seen the addition of a call to a links function. This addition aims to check for errors related to missing links.

  • Updated Validation messages
    In src/features/jobs-moderation/validation-messages.ts, a new error message relating to missing required links has been introduced. This addition ensures the user is informed about a specific error where a link is required in a job post.

  • Environment check added
    In src/helpers/env.ts, an if condition has been added to verify if a certain environment variable (VITEST) is defined, providing a dummy response if so.

  • Updated types for job moderation
    In src/types/jobs-moderation.ts, there have been several additions to support the handling of validation situations where a link is required. It's a part of the effort to ensure complete and clear validation of job posts.

@vcarl vcarl merged commit df591b1 into main Nov 29, 2023
3 checks passed
@vcarl vcarl deleted the vc-jobs-adustment branch November 29, 2023 15:19
@vcarl
Copy link
Member Author

vcarl commented Dec 6, 2023

Hack fix for #321 in that it doesn't delete them anymore, but it's not resolved.

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.

1 participant