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

fix: show PR description generator button. #282

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

a0m0rajab
Copy link
Contributor

Description

Fix the issue of not having the generate description button, and refactor the code.
Added a check to see if the button is already added or not.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Closes #279

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 docs.opensauced.pizza
  • 🍕 dev.to/opensauced
  • 📕 storybook
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@bdougie
Copy link
Member

bdougie commented Nov 8, 2023

Thanks for this @a0m0rajab. I noticed the build is failing.

https://github.com/open-sauced/ai/actions/runs/6788050196/job/18452195546?pr=282#step:6:14

tsc && vite build

src/utils/dom-utils/addDescriptionGenerator.ts:30:61 - error TS2552: Cannot find name 'actionBar'. Did you mean 'actionBars'?

30         actionBarsArray[0].insertBefore(addGeneratorButton, actionBar.firstChild);
                                                               ~~~~~~~~~

  src/utils/dom-utils/addDescriptionGenerator.ts:25:11
    25     const actionBars = document.getElementsByClassName(prActionsClassName);
                 ~~~~~~~~~~
    'actionBars' is declared here.


Found 1 error in src/utils/dom-utils/addDescriptionGenerator.ts:30

@a0m0rajab
Copy link
Contributor Author

a0m0rajab commented Nov 8, 2023

Thanks for the review, I broke the build in the lint/format commit lol. just fixed that.

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @a0m0rajab! A small refactor request.

src/utils/dom-utils/addDescriptionGenerator.ts Outdated Show resolved Hide resolved
Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @a0m0rajab! A small refactor request.

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes @a0m0rajab! 🚀

@nickytonline nickytonline merged commit 4d1b451 into open-sauced:beta Nov 9, 2023
7 checks passed
@a0m0rajab a0m0rajab deleted the fix-show-pr-suggestions branch November 9, 2023 16:42
@a0m0rajab
Copy link
Contributor Author

Anytime, thank you for merging and reviewing it!

Copy link

github-actions bot commented Nov 9, 2023

🎉 This PR is included in version 1.14.3-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Bug: AI extension is not showing the PR writing message
3 participants