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

Refactor/time strings #21

Merged

Conversation

Keyrxng
Copy link
Contributor

@Keyrxng Keyrxng commented Aug 13, 2024

Resolves #14

Tasks to be carried out:

  • related tests

I'm assuming this will be merged quickly and once it and #9 both are more specific test cases can be built if needed. I don't wish to replicate the same changes across PRs in regards to fixing the pr and issue fetching etc

Refactors:

  • direct config access no need for timers and misc props
  • isTaskStale uses ms same as config items and more readable

with config:

      - plugin: http://localhost:4000
        runsOn: ["issue_comment.created"]
        with:
          reviewDelayTolerance: "3 Days"
          taskStaleTimeoutDuration: "15 Days"
          maxConcurrentTasks: 3
          startRequiresWallet: false

QA:

src/types/plugin-input.ts Outdated Show resolved Hide resolved
src/handlers/shared/check-task-stale.ts Outdated Show resolved Hide resolved
src/utils/issue.ts Outdated Show resolved Hide resolved
gentlementlegen pushed a commit to Meniole/command-start-stop that referenced this pull request Aug 14, 2024
README.md Show resolved Hide resolved
Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

I am confused what exactly is reviewDelayTolerance

src/types/plugin-input.ts Outdated Show resolved Hide resolved
@Keyrxng
Copy link
Contributor Author

Keyrxng commented Aug 16, 2024

I am confused what exactly is reviewDelayTolerance

  • reviewDelayTolerance: is used when there is no reviews on their open PRs so it's compared against the created_at value of the PR. Used in issue.ts => getAvailableOpenedPullRequests().
  • taskStaleTimeoutDuration: this is for when the warning message should appear

@0x4007
Copy link
Member

0x4007 commented Aug 16, 2024

Warning message for a task being old and they should confirm the spec is still accurate? 30 days default.

The other should be either 3.5 days default (accommodate weekends) or 1 day. Whatever the original implementation has we can use.

@Keyrxng
Copy link
Contributor Author

Keyrxng commented Aug 16, 2024

@0x4007 Month(s) is not a supported unit with ms and the original default was 1 for reviewDelay

reviewDelayTolerance: stringDuration({ default: "1 day" }),

src/utils/issue.ts Outdated Show resolved Hide resolved
@Keyrxng
Copy link
Contributor Author

Keyrxng commented Aug 21, 2024

Bumping this for review as it also now resolves the issue exposed with the LogReturn logger export used in the bubble-up error comment

@gentlementlegen gentlementlegen self-requested a review August 22, 2024 03:50
@Keyrxng Keyrxng merged commit 930c45e into ubiquity-os-marketplace:development Aug 24, 2024
2 checks passed
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.

Do not show warning message on tasks that were not created a long time ago
4 participants