-
Notifications
You must be signed in to change notification settings - Fork 26
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: multiple prs handling #132
feat: multiple prs handling #132
Conversation
I realized while testing this that there is a part that maybe we didn't take into account: which PR do we consider for the rewards? Because this would be dependent on the order they get closed right now. |
All of them but it should only render the rewards when the last one is closed. |
const result = logger.error("All linked pull requests must be closed to generate rewards."); | ||
await githubCommentModuleInstance.postComment(result.logMessage.diff); | ||
return result.logMessage.raw; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought our logger abstracts all this away. Why not just add a param postComment: boolean
in the logger methods? I'm pretty sure I implemented that the first go around. It was the third parameter I believe.
(message: string, metadata: Record<key, value>, postComment: boolean
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we wanted to separate Supabase from the logger for a few reasons:
- it would require every project to link to Octokit
- that would force every project to include Octokit which differs in use between Actions and Workers
- some do no need to log them (mostly actions) as the logs are saved within the Action run (and now within worker with the new Logs)
My suggestion was to have optional packages that you can add on init, like Octokit does if you want to use pagination for example, where we could link a package that would post comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can file a spec before it's forgotten about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a task carried out about this I remember, let me find it.
ubiquity-os/ubiquity-os-logger#35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on QA seems fine.
Resolves #128
Depends on #121
QA: Meniole#17 (comment)