Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

chore: update config #802

Closed
wants to merge 0 commits into from

Conversation

molecula451
Copy link
Member

@molecula451 molecula451 commented Sep 23, 2023

Resolves #790

Quality Assurance:

@netlify
Copy link

netlify bot commented Sep 23, 2023

Deploy Preview for ubiquibot-staging ready!

Name Link
🔨 Latest commit c6f79f5
🔍 Latest deploy log https://app.netlify.com/sites/ubiquibot-staging/deploys/6516cf725e364f0008782031
😎 Deploy Preview https://deploy-preview-802--ubiquibot-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

0x4007
0x4007 previously approved these changes Sep 23, 2023
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.

Looks pretty good to me although I don't deeply understand all this code's context.

@whilefoo
Copy link
Collaborator

@pavlovcik this PR puts all those shared constants in config which means they can be configured by ubuiquibot-config.yaml. Do we really want that?

@molecula451
Copy link
Member Author

@pavlovcik this PR puts all those shared constants in config which means they can be configured by ubuiquibot-config.yaml. Do we really want that?

pavlocik asked, #748 (comment)

@0x4007
Copy link
Member

0x4007 commented Sep 24, 2023

@pavlovcik this PR puts all those shared constants in config which means they can be configured by ubuiquibot-config.yaml. Do we really want that?

Why is it a bad idea to let our partners configure these things?
These only affect their repositories, right?

@whilefoo
Copy link
Collaborator

Why is it a bad idea to let our partners configure these things?
These only affect their repositories, right?

Permit base url and bot delay probably shouldn't be modified, other things are okay I guess.

src/utils/private.ts Outdated Show resolved Hide resolved
@@ -161,6 +161,13 @@ export const getWideConfig = async (context: Context) => {
openAIKey: mergedConfigData.openAIKey,
openAITokenLimit: mergedConfigData.openAITokenLimit,
staleBountyTime: mergedConfigData.staleBountyTime,
startCommandEnabled: mergedConfigData.startCommandEnabled,
defaultTimeRangeForMaxIssue: mergedConfigData.defaultTimeRangeForMaxIssue,
Copy link
Collaborator

Choose a reason for hiding this comment

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

timeRangeForMaxIssue is a confusing name, I can't really tell what it means just from the name.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the same name as original in shared.ts suggestions are welcome if wey want it Changed it

Copy link
Member

Choose a reason for hiding this comment

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

timeRangeForMaxIssue is a confusing name, I can't really tell what it means just from the name.

What does it do? Let's rename it to something more expressive.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's used when checking if a bounty hunter can assign a new issue and it checks how many issues is already assigned to them and how many pull requests are approved or with no reviews but X time old. TimeRangeForMaxIssue is X.

Copy link
Member

Choose a reason for hiding this comment

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

What should we rename it to?

Copy link
Member Author

Choose a reason for hiding this comment

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

this where the gpt /ask would come in handy for all to see

/ask can you provide some names for timeRangeForMaxIssue var

Copy link
Member Author

Choose a reason for hiding this comment

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

timeRangeForMaxIssue is a confusing name, I can't really tell what it means just from the name.

Certainly! Here is a list of similar names for the variable "timeRangeForMaxIssue":

maxIssueTimeRange
issueTimeRangeMax
maxIssueDuration
timeFrameForMaxProblem
peakIssueTimeSpan
maximumIssueTimeFrame
issuePeakWindow
peakProblemTimeRange
maxIssuePeriod
timeSpanForPeakIssues

src/utils/private.ts Outdated Show resolved Hide resolved
@molecula451
Copy link
Member Author

Why is it a bad idea to let our partners configure these things?
These only affect their repositories, right?

Permit base url and bot delay probably shouldn't be modified, other things are okay I guess.

But they could use the defacto value. The thing is getting rid of shared.ts no?

@0x4007
Copy link
Member

0x4007 commented Sep 24, 2023

Permit base url and bot delay

Well the base url is just an RPC endpoint. I dont see the issue with partners setting their own dedicated RPC endpoints if they really need it for some reason.

What is bot delay for?

@whilefoo
Copy link
Collaborator

Well the base url is just an RPC endpoint. I dont see the issue with partners setting their own dedicated RPC endpoints if they really need it for some reason.

It's not RPC endpoint, it is the claim url https://pay.ubq.fi

What is bot delay for?

it seems it's for the telegram feature, as you said we can remove this feature but if someone sets it to a large number then the bot will timeout.

@0x4007
Copy link
Member

0x4007 commented Sep 24, 2023

Well the base url is just an RPC endpoint. I dont see the issue with partners setting their own dedicated RPC endpoints if they really need it for some reason.

It's not RPC endpoint, it is the claim url https://pay.ubq.fi

Whitelabeling the claims portal seems pretty fancy but perhaps not in our best interests. It can be a secret config setting lol

What is bot delay for?

it seems it's for the telegram feature, as you said we can remove this feature but if someone sets it to a large number then the bot will timeout.

We should completely wipe that stuff then it all seems like problematic code.

@molecula451
Copy link
Member Author

We should completely wipe that stuff then it all seems like problematic code.

The telegram stuff seems out of scope for this PR, needs greater refactor

@molecula451
Copy link
Member Author

shared.ts it's purged

@molecula451
Copy link
Member Author

@wannacfuture might want to help pavlovcik debug and Review this simple PR?

@wannacfuture
Copy link
Contributor

wannacfuture commented Sep 29, 2023

Would you mind resolving the conflicts?

Let's get this merged before more config conflicts occur. @pavlovcik

@molecula451 , Please post a QA.

@molecula451
Copy link
Member Author

I do not see an issue with conflicts. The only conflicts shows it's shared.ts but shared.ts it getting purged in this PR there shouldn't be issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move shared constants to default config file.
4 participants