holdex / pr-time-tracker

https://autoinvoice-theta.vercel.app
0 stars 3 forks source link

Goal: make message from the bot sticky to the bottom of the thread #283

Open zolotokrylin opened 4 months ago

zolotokrylin commented 4 months ago

Problem: currently, if you do not submit the time right away, the message can be lost as new messages from people arrive in the thread.

Solution

Make the message from the bot always stick to the bottom of the thread (same as conventional commit Action behavior)

zolotokrylin commented 4 months ago

@georgeciubotaru what is the aprox cost here, please?

georgeciubotaru commented 4 months ago

@zolotokrylin What is the value here?

The important thing for all the contributors (creator, reviewer, others) should be the checks block from the bottom, not the messages about cost submission.

Also, there are notifications to submit the cost with the direct mention, so clicking on the notification should send you to the correct place.

The problem is that the developers don't submit the cost immediately.

zolotokrylin commented 4 months ago

@georgeciubotaru

Also, there are notifications to submit the cost with the direct mention, so clicking on the notification should send you to the correct place.

It sends you to the bottom of the thread, not to the message, unless the message is the last.

What is the value here?

Please read the problem statement I wrote in the description of this issue.

The important thing for all the contributors (creator, reviewer, others) should be the checks block from the bottom, not the messages about cost submission.

Yes, it is important thing, but does it lead you to the PR cost submission link?


Could you please provide an answer to my original question?

georgeciubotaru commented 4 months ago

@zolotokrylin

Example of how to submit the cost another way: (by clicking on the Details link on the failed check, as we are doing with the Vercel in case the deployment failed).

image

Cost: 3h

zolotokrylin commented 4 months ago

image

I need to scroll and find the message.

bytegun commented 3 months ago

@zolotokrylin @georgeciubotaru I think GitHub token provided in the .npmrc is expired or invalid. Could you provide another one?

georgeciubotaru commented 3 months ago

@bytegun Sorry for the inconvenience. Updated the main branch code.

georgeciubotaru commented 3 months ago

@bytegun In case it doesn't work try to add one of yours locally

bytegun commented 3 months ago

@georgeciubotaru My account should have access to the repository that hosts the @holdex/autoinvoicing package. Could you please grant me access?

Otherwise, I need the correct GHP token and will also need to log in to npm using npm login with the account associated with the GitHub account that holds the GHP token.

bytegun commented 3 months ago

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.pkg.github.com/@holdex%2fautoinvoicing - Permission permission_denied: read_package
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in: C:\Users\Santa\AppData\Local\npm-cache\_logs\2024-08-08T16_01_38_187Z-debug-0.log```
georgeciubotaru commented 3 months ago

@bytegun try 'npm run pre-dev' and take the ghToken from end variables (NPM_RC)

georgeciubotaru commented 3 months ago

@bytegun What is the status here?

  1. Did you start working? If yes, please assign yourself.
  2. If you start working don't forget about our rules for attaching the related PR
bytegun commented 3 months ago

@georgeciubotaru I can't self assign this issue. I don't have necessary permissions to do it. I am struggling making the github bot from this project. What webhook url should I use for the bot? https://alert-seemingly-moccasin.ngrok-free.app/api/trigger Is this URL for the webhook of the github bot?

georgeciubotaru commented 3 months ago

@bytegun Did you manage to run the dev env?

bytegun commented 3 months ago

@georgeciubotaru Yes, I ran the dev env. Could you please send me the invitation again? It seems the link expired.

georgeciubotaru commented 3 months ago

@bytegun you don't need invitation the repo is open sourced

bytegun commented 3 months ago

Okay, got it. What is the webhook URL for the bot? https://alert-seemingly-moccasin.ngrok-free.app/api/trigger Is it webhook URL?

georgeciubotaru commented 3 months ago

@bytegun No, please check how our integration works, especially trigger.dev

bytegun commented 3 months ago

@georgeciubotaru I found that I can't receive events other than issues, pull_request, pull_request_review, check_run But I need to receive issue_comment event. How can I change desired events?

georgeciubotaru commented 3 months ago

@bytegun Why do you need to parse issue_comment events?

bytegun commented 3 months ago

@georgeciubotaru To make the bot's message sticky to the bottom, I want to get issue_comment event and delete the bot's message and write again.

georgeciubotaru commented 3 months ago

@bytegun That bot-message happens during an action submitting cost so you should work on that. You don't need issue_comments parser.

bytegun commented 3 months ago

@georgeciubotaru Yes, I know that but the goal is to move the bot's message to the bottom when a comment is added, isn't it?

georgeciubotaru commented 3 months ago

@bytegun Please ready carefully the whole discussion on this Goal.

teodorus-nathaniel commented 4 weeks ago

Hi @zolotokrylin @georgeciubotaru, I'd like to confirm my understanding of this issue.

Currently, when a contributor submits the required time, the bot sends the following message: image However, as the conversation continues, this message gets buried under newer messages, making it less accessible.

@zolotokrylin

Example of how to submit the cost another way: (by clicking on the Details link on the failed check, as we are doing with the Vercel in case the deployment failed). image

Cost: 3h

So the solution is to have the bot display this message at the bottom of the chat, like the above message that @georgeciubotaru sent

Is my understanding correct?

georgeciubotaru commented 4 weeks ago

Hi @teodorus-nathaniel, we displaying messages only if you didn't submit the PR cost. we want this message to be always the last one (in case there are commits or comments added)

Feel free to create a test PR and see yourself the entire flow

teodorus-nathaniel commented 4 weeks ago

So do you mean like the message below, needs to be always the last message in the thread? image

And just to make sure, can I create multiple PRs for testing?

georgeciubotaru commented 4 weeks ago

@teodorus-nathaniel Yes

Can I create multiple PRs for testing? Yes, you can, but use the proper PR title

teodorus-nathaniel commented 4 weeks ago

Can you verify that this flow fits the requirement? In high level:

  1. The bot sends the reminder to "submit the time"
  2. On every pull_request_review_comment, it deletes the old message, and post a new one

But the drawback of this is all the mentioned people will be re-mentioned every time

georgeciubotaru commented 4 weeks ago

@teodorus-nathaniel Please move all the comments to the related Problem (non Goal) or create one if missing.

teodorus-nathaniel commented 4 weeks ago

Seems like it is related in this closed issue #205 This same method was mentioned there, so Ill do it this way for now

markholdex commented 4 weeks ago

@teodorus-nathaniel Please follow the Guidelines I shared with you and create a Problem. Use that problem to address questions. However, I believe we already agreed on the outcome. I would prefer us to not give clues on the solution during the trial. Instead, it's your time to shine by implementing a solution that reflects the business requirements.

teodorus-nathaniel commented 4 weeks ago

Yeah sure, it's just my habit to confirm the flow 😅 I'm currently on progress creating the solution, the ETA is about 5 hours

teodorus-nathaniel commented 4 weeks ago

Hello, the PR #306 is ready to review now

FYI, I changed a bit too in the @holdex/autoinvoicing package to enable issue_comment event handling, so it needs to be republished

markholdex commented 3 weeks ago

Hey @teodorus-nathaniel good job so far. Reminding you about the remaining comment to complete things:

teodorus-nathaniel commented 3 weeks ago

Hey @teodorus-nathaniel good job so far. Reminding you about the remaining comment to complete things:

oh, that's already merged here

markholdex commented 3 weeks ago

My bad @teodorus-nathaniel appreciate your reply.

markholdex commented 3 weeks ago

log: implementation tested, everything is working as intended.

zolotokrylin commented 2 days ago

image

It is not sticky

teodorus-nathaniel commented 1 day ago

It is not sticky

Log: checking @georgeciubotaru is it possible for you to share me access of prod trigger dev? I want to confirm whether the issue is same as what I identified for now or not