+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
os: ['ubuntu-18.04']
otp: ['24.3.3']
elixir: ['1.14.3']
node: ['12.22.12']
node: ['12.8.0']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -110,6 +110,6 @@ jobs:
- name: Push VERSION file
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPO_DISPATCH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: elixir:1.12-slim
image: elixir:1.14-slim

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.12.0
elixir 1.14.3
erlang 24.3.3
nodejs 12.8.0
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: server release compile test dialyzer plt clean
.PHONY: server release compile test coverage dialyzer plt clean

export MIX_ENV ?= dev
export SECRET_KEY_BASE ?= $(shell mix phx.gen.secret)
Expand All @@ -19,6 +19,10 @@ test: MIX_ENV=test
test: dialyzer
@mix test

coverage: MIX_ENV=test
coverage:
@mix coverage

dialyzer: MIX_ENV=dev
dialyzer:
@mix dialyzer --check=false
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.5.2
2 changes: 1 addition & 1 deletion assets/js/components/OrgHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import LanguagesProgressBar from './LanguagesProgressBar';
import CountUp from 'react-countup';
import {GoCode, GoStar} from "react-icons/all";

const OrgHeader:React.FC<{org: Org, maxLanguages: number, starsSum: number}> = ({org, maxLanguages, reposQuantity, starsSum}) => {
const OrgHeader:React.FC<{org: Org, maxLanguages: number, starsSum: number}> = ({org, maxLanguages, starsSum}) => {
const orgDate = new Date(org.created_at);
const createdDate = `${orgDate.toLocaleString('en', { month: 'long' })} ${orgDate.getFullYear()}`;
const location = org.yml_data.location || org.location;
Expand Down
4 changes: 1 addition & 3 deletions assets/js/pages/org.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ const OrgPage: React.FC<RouteComponentProps<MatchParams>> = ({match}) => {
const orgName = match.params.name;
const response = useFetch(`/api/orgs/${orgName}`) as OrgResponse;
const repos = useFetch(`/api/orgs/${orgName}/repos?sort=popular`) as OrgReposResponse;
const starsSum = repos.data.reduce((acc, r)=>{
return acc + r.stargazers_count;
}, 0);
const org = response.data;
const starsSum = org.star_count;
const maxLanguages = 5;

return <>
Expand Down
2 changes: 1 addition & 1 deletion assets/js/pages/orgs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const OrgList: React.FC = () => {
<span>{org.yml_data.name}</span>
</Col>
<Col md="2" className="org-details">
<span>{org.repo_count} Repos</span>
<span>{org.repo_count} Repos</span>, <span>{org.star_count} Stars</span>
</Col>
<Col className="org-location">
{org.yml_data.location &&
Expand Down
1 change: 1 addition & 0 deletions assets/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export type Org = {
languages: Array<Language>;
created_at: string;
repo_count: number;
star_count: number;
}

export type Counters = {
Expand Down
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# is restricted to this project.

# General application configuration
use Mix.Config
import Config

# Configures the endpoint
config :coophub, CoophubWeb.Endpoint,
Expand Down
26 changes: 1 addition & 25 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

# For development, we disable any cache and enable
# debugging and code reloading.
Expand All @@ -21,30 +21,6 @@ config :coophub, CoophubWeb.Endpoint,
]
]

# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# Mix task:
#
# mix phx.gen.cert
#
# Note that this task requires Erlang/OTP 20 or later.
# Run `mix help phx.gen.cert` for more information.
#
# The `http:` config above can be replaced with:
#
# https: [
# port: 4001,
# cipher_suite: :strong,
# keyfile: "priv/cert/selfsigned_key.pem",
# certfile: "priv/cert/selfsigned.pem"
# ],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
# different ports.

# Watch static and templates for browser reloading.
config :coophub, CoophubWeb.Endpoint,
live_reload: [
Expand Down
36 changes: 1 addition & 35 deletions config/prod.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

# For production, don't forget to configure the url host
# to something meaningful, Phoenix uses this information
Expand Down Expand Up @@ -32,37 +32,3 @@ config :coophub,

# Do not print debug messages in production
config :logger, level: :info

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :coophub, CoophubWeb.Endpoint,
# ...
# url: [host: "example.com", port: 443],
# https: [
# :inet6,
# port: 443,
# cipher_suite: :strong,
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")
# ]
#
# The `cipher_suite` is set to `:strong` to support only the
# latest and more secure SSL ciphers. This means old browsers
# and clients may not be supported. You can set it to
# `:compatible` for wider support.
#
# `:keyfile` and `:certfile` expect an absolute path to the key
# and cert in disk or a relative path inside priv, for example
# "priv/ssl/server.key". For all supported SSL configuration
# options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1
#
# We also recommend setting `force_ssl` in your endpoint, ensuring
# no data is ever sent via http, always redirecting to https:
#
# config :coophub, CoophubWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Mix.Config
import Config

# We don't run a server during test. If one is required,
# you can enable the server option below.
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载