Skip to content

Commit

Permalink
Merge branch 'beta' into enable-ai-on-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
a0m0rajab authored Nov 9, 2023
2 parents 7524d5a + bc44a66 commit 1a4aa6b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

> All notable changes to this project will be documented in this file
## [1.14.3-beta.1](https://github.com/open-sauced/ai/compare/v1.14.2...v1.14.3-beta.1) (2023-11-09)


### 🐛 Bug Fixes

* change the classname and remove extra code ([241c385](https://github.com/open-sauced/ai/commit/241c385e82f3757b95b045423fbb01e512772bfd))
* elemenet to the dom if it's not added already ([c654b82](https://github.com/open-sauced/ai/commit/c654b826d2443adc6cffbeaa61970b6294596ca6))

## [1.14.2](https://github.com/open-sauced/ai/compare/v1.14.1...v1.14.2) (2023-11-06)


Expand Down
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opensauced-browser-extension",
"private": true,
"version": "1.14.2",
"version": "1.14.3-beta.1",
"files": [
"dist"
],
Expand Down
16 changes: 6 additions & 10 deletions src/utils/dom-utils/addDescriptionGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ const injectDescriptionGeneratorButton = async () => {
}
}

const prActionsClassName = "ActionBar-item-container";
const actionBars = document.getElementsByClassName(prActionsClassName);
const actionBarsArray = Array.from(actionBars);

actionBarsArray.forEach((actionBar, index) => {
if (!actionBar.querySelector(`#ai-description-button-${index}`)) {
const addGeneratorButton = DescriptionGeneratorButton(index);

actionBar.insertBefore(addGeneratorButton, actionBar.firstChild);
}
const actionBars = document.querySelectorAll(".ActionBar-item-container");
actionBars.forEach((actionBar, index) => {

Check failure on line 25 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected blank line before this statement
if (firstPrDescription && !firstPrDescription.querySelector(`#ai-description-button-${index}`)) {

Check failure on line 26 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected indentation of 8 spaces but found 6

Check failure on line 26 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Unsafe call of an `any` typed value
const addGeneratorButton = DescriptionGeneratorButton(index);

Check failure on line 27 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected indentation of 12 spaces but found 6
firstPrDescription.insertBefore(addGeneratorButton, firstPrDescription.firstChild);

Check failure on line 28 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected indentation of 12 spaces but found 6

Check failure on line 28 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected blank line before this statement

Check failure on line 28 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Unsafe call of an `any` typed value
}

Check failure on line 29 in src/utils/dom-utils/addDescriptionGenerator.ts

View workflow job for this annotation

GitHub Actions / test / Code standards

Expected indentation of 8 spaces but found 4
});
};

Expand Down

0 comments on commit 1a4aa6b

Please sign in to comment.