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

Patch 3 #49

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
015b9df
:arrow_up: Bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 20, 2020
8cd91c2
:arrow_up: Bump node-fetch from 2.6.0 to 2.6.1
dependabot[bot] Sep 12, 2020
b3ed243
Merge pull request #21 from maxam2017/dependabot/npm_and_yarn/node-fe…
maxam2017 Sep 23, 2020
577e78a
Merge pull request #15 from maxam2017/dependabot/npm_and_yarn/lodash-…
maxam2017 Sep 23, 2020
5e47530
Use defaultBranchRef
inokawa Jan 26, 2021
2d8f685
Use defaultBranchRef in response
inokawa Feb 12, 2021
a246be6
Merge pull request #30 from inokawa/master
maxam2017 Feb 12, 2021
5b7618e
:construction_worker: setup build ci
maxam2017 Apr 1, 2021
97fb359
:robot: build automatically
github-actions[bot] Apr 1, 2021
a26fedd
:construction_worker: execute two workflows by order
maxam2017 Apr 1, 2021
7779d45
:robot: build automatically
github-actions[bot] Apr 1, 2021
f088929
:wrench: allow empty commit
maxam2017 Apr 21, 2021
2d269e5
:robot: build automatically
github-actions[bot] Apr 21, 2021
d3bfab8
:arrow_up: Bump lodash from 4.17.19 to 4.17.21
dependabot[bot] May 11, 2021
92740c5
Merge pull request #37 from maxam2017/dependabot/npm_and_yarn/lodash-…
maxam2017 May 23, 2021
d37b592
:robot: build automatically
github-actions[bot] May 23, 2021
1c15616
:arrow_up: Bump glob-parent from 5.1.1 to 5.1.2
dependabot[bot] Jun 11, 2021
22641e9
Merge pull request #39 from maxam2017/dependabot/npm_and_yarn/glob-pa…
maxam2017 Jul 3, 2021
a162e1c
:robot: build automatically
github-actions[bot] Jul 3, 2021
fa033b8
Update README.md
SeungAhSon Jun 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [14]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: build
run: |
yarn install
yarn build
- name: commit change & push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add .
git commit --allow-empty -m ":robot: build automatically"
git push
- name: repository dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GH_TOKEN }}
event-type: build-event
5 changes: 2 additions & 3 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Update gist
on:
push:
branches:
- master
repository_dispatch:
types: [build-event]
schedule:
- cron: "0 0 * * *"
jobs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<br/>
When are you most productive during the day?
<br/>
Let's check out in gist!
Let's check out in gist!
</p>

---
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ interface IRepo {
let night = 0; // 0 - 6

committedTimeResponseMap.forEach(committedTimeResponse => {
committedTimeResponse?.data?.repository?.ref?.target?.history?.edges.forEach(edge => {
committedTimeResponse?.data?.repository?.defaultBranchRef?.target?.history?.edges.forEach(edge => {
const committedDate = edge?.node?.committedDate;
const timeString = new Date(committedDate).toLocaleTimeString('en-US', { hour12: false, timeZone: process.env.TIMEZONE });
const hour = +(timeString.split(':')[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createContributedRepoQuery = (username: string) => `
export const createCommittedDateQuery = (id: string, name: string, owner: string) => `
query {
repository(owner: "${owner}", name: "${name}") {
ref(qualifiedName: "master") {
defaultBranchRef {
target {
... on Commit {
history(first: 100, author: { id: "${id}" }) {
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,9 @@ get-stream@^5.0.0:
pump "^3.0.0"

glob-parent@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"

Expand Down Expand Up @@ -1189,9 +1189,9 @@ locate-path@^5.0.0:
p-locate "^4.1.0"

lodash@^4.17.14, lodash@^4.17.15:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

log-symbols@^1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -1301,9 +1301,9 @@ nice-try@^1.0.4:
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==

node-fetch@^2.3.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==

normalize-path@^3.0.0:
version "3.0.0"
Expand Down