Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
2019 upgrade (#360)
Browse files Browse the repository at this point in the history
* Update for 2019

* Add grace period support.

This year there is a 1 week grace period before a PR counts, this commit
adds support for this by displaying 'pending' next to any that are
less than a week old.

* Add thanks yo digital ocean and dev to

* Minor fixes to 2019 update (#359)

* Fix react-scripts build error

./src/components/PageWrapper.js
TypeError: Cannot read property 'forEach' of undefined

was being thrown during build. According to a github issue downgrading is the solution

facebook/create-react-app#7753

* Fix issue text colours

* Fixed npm typo

* Unignored package-lock.json
  • Loading branch information
jenkoian committed Sep 30, 2019
1 parent 85afaf7 commit 3b10f5e
Show file tree
Hide file tree
Showing 43 changed files with 67,004 additions and 40,145 deletions.
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore
@@ -1,8 +1,6 @@
# Node stuff
npm-debug.log
node_modules
# Favour yarn.lock, heroku fails if both included
package-lock.json

# API keys
.env
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -5,7 +5,6 @@ node_js:
cache:
directories:
- "node_modules"
yarn: true

before_script: yarn install
script: yarn run eslint
before_script: npm install
script: npm run eslint
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -10,10 +10,10 @@ USER octocat
COPY --chown=octocat:octocat package.json /app

# The latest offical nodejs image already includes yarn.
RUN yarn install --production --pure-lockfile
RUN npm install --production

COPY --chown=octocat:octocat . /app

EXPOSE 5000

ENTRYPOINT ["yarn", "start"]
ENTRYPOINT ["npm", "start"]
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 - 2018 Ian Jenkins
Copyright (c) 2015 - 2019 Ian Jenkins

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Procfile
@@ -1,2 +1,2 @@
release: yarn install --production --pure-lockfile
web: yarn start
release: npm install --production
web: npm start
49 changes: 32 additions & 17 deletions README.md
Expand Up @@ -6,29 +6,36 @@
Useful checker web app to see how close you are to achieving the requirements for a free t-shirt as part of [Hacktoberfest](https://hacktoberfest.digitalocean.com/).

[https://hacktoberfestchecker.jenko.me/](https://hacktoberfestchecker.jenko.me/)
([https://hacktoberfestchecker.herokuapp.com/](https://hacktoberfestchecker.herokuapp.com/) will still work)

![Screenshot](hacktoberfest-checker-2018.png)
![Screenshot](hacktoberfest-checker-2019.png)

## 2018!
## 2019!

~I had some grand plans for this years edition but unfortunately I've not had the time. It basically equates to using
React on the front end. I did make a start, and may look to release it midway through Hacktoberfest. If you fancy hacking
along with me, keep an eye on the react branch. Other than that, I've done a simple reskin and more or less
kept it as it were last year (obviously updated the year and new PR requirement).~
My plan for this years edition was to use next.js but sadly I ran out of time (starting the night before October may not have been the best plan!).
If anyone fancies learning [next.js](https://nextjs.org) along with me take a look at the [nextjs](https://github.com/jenkoian/hacktoberfest-checker/tree/nextjs) branch where I start from scratch or the [nextjs2](https://github.com/jenkoian/hacktoberfest-checker/tree/nextjs2) branch where I conver existing app to nextjs.
In case you hadn't worked it out already, JS is not my area of expertise, but one of things I use this repo for is to keep up with JS and various libraries and things I read about and nextjs is something I like the look of.

With massive thanks to [Rafael Klaessen](https://github.com/rafaelklaessen) the react version is now merged and live!
So whether the nextjs version sees the light of day or not, I've still made a few updates to the existing app for 2019:

I will add some tickets when I think of them of improvements etc. feel free to suggest any you can think of though too.
* Updated the logo and colour scheme to fit the new theme
* Used a hexagon for the user image
* Updated a few underlying libraries

You may notice the domain has changed, the old heroku app is still up and I will deploy to both, but the new domain is hosted on
digital ocean as they were kind enough to offer me some hosting vouchers.
I'll try and get some issues up which I think might be good things to contribute.

I've removed the issue and pull request templates as I find them more of a barrier than anything. That said, I'm not opposed to reviewing new versions should anyone wish to PR.

Finally, I have to give a big shout out to [DigitalOcean](https://www.digitalocean.com/) and [Dev](https://dev.to/) for yet another awesome event and their support for this checker app also.

### Doesn't DigitalOcean have their own progress checker now?

They do! However, I still think it's worth having a checker which doesn't require auth and allows you to check on your mates (or celebrity developers!).

Happy hacking!

## Requirements

* Node v8+
* Node v10+
> Recommended to use [NVM](https://github.com/creationix/nvm)
## Running the app
Expand All @@ -40,16 +47,24 @@ Happy hacking!
* Windows (cmd.exe): `set GITHUB_TOKEN=YOUR TOKEN`
* Windows (PowerShell): `$env:GITHUB_TOKEN=YOUR TOKEN`

* `$ yarn install`
* `$ npm install`

* `$ npm run tailwind-gen`

* `$ yarn start`
* `$ npm start`

* Point browser to [localhost:5000](http://localhost:5000)

Want to run the API server and the frontend in their own processes? Use this:
```bash
$ yarn start-frontend
$ yarn start-server
$ npm run start-frontend
$ npm run start-server
```

or in a single command...

```bash
$ npm run start-development
```

### Running the app within Docker
Expand All @@ -66,4 +81,4 @@ or use the docker-compose

## License

MIT © 2015-2018 [Ian Jenkins](https://github.com/jenkoian)
MIT © 2015-2019 [Ian Jenkins](https://github.com/jenkoian)
3 changes: 3 additions & 0 deletions api/controllers/pr/findPrs/index.js
Expand Up @@ -19,6 +19,8 @@ const findPrs = (github, username) => {
label => label.name.toLowerCase() === 'hacktoberfest'
);

const weekOld = moment().subtract(7, 'days').startOf('day');

return {
has_hacktoberfest_label: hacktoberFestLabels,
number: event.number,
Expand All @@ -27,6 +29,7 @@ const findPrs = (github, username) => {
title: event.title,
url: event.html_url,
created_at: moment(event.created_at).format('MMMM Do YYYY'),
is_pending: moment(event.created_at).isAfter(weekOld),
user: {
login: event.user.login,
url: event.user.html_url
Expand Down
2 changes: 1 addition & 1 deletion app.json
Expand Up @@ -3,7 +3,7 @@
"description":
"Small app to see if you have fulfilled the requirements for a Hacktoberfest t-shirt.",
"keywords": ["hacktoberfest", "hacktoberfestchecker"],
"website": "https://hacktoberfestchecker.herokuapp.com",
"website": "https://hacktoberfestchecker.jenko.me",
"repository": "https://github.com/jenkoian/hacktoberfest-checker",
"logo":
"https://github.com/jenkoian/hacktoberfest-checker/blob/master/public/img/og.png?raw=true",
Expand Down
Binary file removed hacktoberfest-checker-2018.png
Binary file not shown.
Binary file added hacktoberfest-checker-2019.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b10f5e

Please sign in to comment.