-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from open-sauced/beta
main <- v1.10.0-beta.3
- Loading branch information
Showing
13 changed files
with
240 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Monthly issue metrics | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '13 2 1 * *' | ||
|
||
jobs: | ||
build: | ||
name: issue metrics | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Get dates for last month | ||
shell: bash | ||
run: | | ||
# Get the current date | ||
current_date=$(date +'%Y-%m-%d') | ||
# Calculate the previous month | ||
previous_date=$(date -d "$current_date -1 month" +'%Y-%m-%d') | ||
# Extract the year and month from the previous date | ||
previous_year=$(date -d "$previous_date" +'%Y') | ||
previous_month=$(date -d "$previous_date" +'%m') | ||
# Calculate the first day of the previous month | ||
first_day=$(date -d "$previous_year-$previous_month-01" +'%Y-%m-%d') | ||
# Calculate the last day of the previous month | ||
last_day=$(date -d "$first_day +1 month -1 day" +'%Y-%m-%d') | ||
echo "$first_day..$last_day" | ||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" | ||
- name: Run issue-metrics tool | ||
uses: github/issue-metrics@v2 | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
SEARCH_QUERY: 'repo:open-sauced/ai is:issue created:${{ env.last_month }} -reason:"not planned"' | ||
|
||
- name: Create issue | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: Monthly issue metrics report | ||
content-filepath: ./issue_metrics.md | ||
assignees: bdougie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
The utility functions used by the OpenSauced Extension project can be found in [src/utils](https://github.com/open-sauced/ai/tree/beta/src/utils). Each utility function serves a single purpose and is intended to be reusable across different parts of the project. The utilities are organized into domain-specific sub-directories within the utils folder, such as [/utils/dom-utils](https://github.com/open-sauced/ai/tree/beta/src/utils/dom-utils) for utilities related to manipulating the DOM. | ||
|
||
| NOTE: This page is not meant to be an exhaustive list of all utility functions used in the project, but to highlight a few of the ones that may otherwise be esoteric. | | ||
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
|
||
### [cachedFetch()](https://github.com/open-sauced/ai/blob/beta/src/utils/cache.ts) | ||
|
||
Added in PR [#36](https://github.com/open-sauced/ai/pull/36), the function allows you to cache responses from API calls in local storage, reducing the number of network requests and improving performance. It takes a URL and optional options object as arguments, including an option to set the time in seconds before the cache expires and force a refresh. If there is a cached response that has not expired, it returns that instead of making another call. Otherwise, it makes a fetch request and caches the response if it meets certain criteria (status code 200 and content type JSON or text). | ||
|
||
### [createHtmlElement()](https://github.com/open-sauced/ai/blob/beta/src/utils/createHtmlElement.ts) | ||
|
||
Added in PR [#20](https://github.com/open-sauced/ai/pull/20), the function creates an HTML element of a specified tag name and with optional properties. The properties can include styles, which are applied to the element's inline style attribute. Other non-style properties are also supported and added to the created element using `Object.assign()`. [Orginal implementation](https://gist.github.com/nickytonline/8223b27b19c080c28d9f0d3b7fce1e82). | ||
|
||
### [checkAuthentication()](https://github.com/open-sauced/ai/blob/beta/src/utils/checkAuthentication.ts) | ||
Added in PR [#56](https://github.com/open-sauced/ai/pull/56), this function checks if the user is authenticated by retrieving a cookie from Chrome storage and verifying its validity. If the cookie does not exist or is invalid, it removes any saved authentication token from Chrome storage. | ||
|
||
### [domUpdateWatch()](https://github.com/open-sauced/ai/blob/beta/src/utils/dom-utils/domUpdateWatcher.ts) | ||
Added in PR [64](https://github.com/open-sauced/ai/pull/64), this function is used to observe changes in the DOM and trigger a callback function when changes occur. The function uses a `MutationObserver` to track changes in the document body, and checks if the page has fully loaded before executing the callback with any specified delay time. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters