Commit Graph

155 Commits

Author SHA1 Message Date
chris48s
7e8b85ecd0 small docs fix: defs --> prestart (#9887)
running `npm run defs` omits the BASE_URL= env var
2024-01-13 18:24:33 +00:00
chris48s
01de8910cd deploy on node 20 (#9799)
* deploy on node 20

* use appropriate npm versions for each node version
2023-12-30 19:03:34 +00:00
chris48s
b8819746c1 stop linking to twitter (#9685) 2023-12-09 18:55:27 +00:00
chris48s
61cd2082fc twitter --> X (#9678) 2023-10-24 18:46:10 +00:00
Pierre-Yves Bigourdan
1d9a6b0f80 Point to security policy in README (#9544)
* Point to security policy in README

* Fix typo
2023-09-02 22:41:09 +00:00
Tom Heaton
223f423b21 Replace localhost with domain in example link. (#9506)
Replace localhost with domain in example link.
2023-08-25 11:18:07 +00:00
chris48s
0ffa3669b3 deploy on node 18 (#9385)
* deploy on node 18, run tests on node 20

* run test-bug-run-badge on node 18

* you missed a spot

* ..and another
2023-08-10 18:40:17 +00:00
chris48s
d882433fd9 move some docs to the website (#9347)
* move some docs to the website

* update expected test value

* link to new documentation locations
2023-07-24 12:20:43 +01:00
chris48s
50ea7068a8 migrate frontend to docusaurus (#9014)
* delete loads of really important stuff that we definitely need

* v basic MVP smoosh docusaurus PoC into repo

* TODO

* delete more really important stuff

* TODO

* tidyup: use run-s

* don't redirect images used in frontend to raster proxy

* fix routing

* preserve the /endpoint link

* delete the blog (for now)

I would quite like to re-add this at some point
but its not really the top priority thing right now

* content edits

* appease the lint gods

* update danger rules

* remove placeholder

* cypress tests

* dockerhub --> ghcr

* Revert "dockerhub --> ghcr"

This reverts commit ef74cbb26b.

* downgrade lockfile format

* implement defs/BASE_URL

* fix e2e build

* actually fix cypress tests

* always run cypress tests on build

* this never worked

* add command for docusaurus:clear

* delete more code we don't need any more

* update ESLint/prettier config

* delete unsused exports

* documentation updates

* delete a fairly large chunk of our dependency tree

* allow base_url as build arg to Dockerfile

* fixup dockerfile

* work out base url at runtime if not set

doing this at image build time is not the right approach

* remove gatsby monorepo from closebot

* rename HomepageFeatures to homepage-features
2023-06-17 10:59:07 +01:00
Paula Barszcz
bb1fda2aa7 deprecate lgtm; lgtm service tests should be passing (#8771) 2023-01-04 19:48:47 +00:00
Pierre-Yves Bigourdan
81dcf9cb36 Update number of badges served each month (#7723) 2022-03-13 17:27:13 +01:00
chris48s
313dc983f1 upgrade to node 16 (#7271) 2021-11-15 19:29:50 +00:00
Pierre-Yves B
8fd54b1b8d Switch all shields.io links to https (#6935) 2021-08-22 17:20:59 +01:00
Paul Melnikow
3cedd46287 Delegate related projects to awesome-badges list (#6746)
* Delegate related projects to awesome-badges list

* Reformat

* Tweak

* Move section

* No endorsement doesn't mean we disapprove

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2021-07-09 22:31:29 -05:00
Seth Falco
856c71c1da docs: broken links and typos (#6676)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-06-30 02:29:38 +00:00
Pierre-Yves B
68fb0b7bab Run on node 14 in production, drop node 10 support for badge-maker and update test matrix (#6652) 2021-06-21 20:46:55 +01:00
Pierre-Yves B
dfb92961c1 Delete outdated users.md (#6390) 2021-04-19 21:34:50 +01:00
Pierre-Yves B
f1dc5b27f1 Update number of badges served each month (#6278)
* Update number of badges served each month

* Use less precise numbering in releases documentation
2021-03-18 14:18:34 +00:00
chris48s
ebaf4f5b48 use a logo in the README that looks ok in light or dark mode (#5949) 2020-12-17 16:33:57 +00:00
chris48s
0be2ee0aa7 post-Heroku migration cleanup tasks (#5886)
* remove 'commits to be deployed' badge

* remove old deploy scripts

* update prod hosting docs

* remove 'commit is/isn't in gh-pages' action

* remove OVH servers from docs

* clarify role of CloudFlare DNS

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-12-01 19:48:20 +00:00
Caleb Cartwright
9803471170 docs: cleanup hacktoberfest readme material (#5812) 2020-11-07 12:03:33 -06:00
Caleb Cartwright
88b3bc72dd docs: add hacktoberfest badges to readme (#5596) 2020-09-24 04:26:04 +00:00
Pierre-Yves B
2c329cdbb3 Update documentation about snapshot tests (#5468) 2020-08-29 21:28:27 +02:00
Pierre-Yves B
1047fd9c7e Remove badgerbadgerbadger from related projects and add poser (#5456) 2020-08-23 19:08:30 +02:00
chris48s
0bcd7eef15 Run on node 12 in production, update test matrix (#5436)
* upgrade node/npm versions in package.json

* delete config for zeit now
zeit now is no more, vercel have decomissioned the now v1 platform

* upgrade to node 12 for (docker) self-hosting users

* update docs

* update test matrix
run tests on node 12 and node 14

* link to nodejs version support docs in package comment
we'll continue to tun the package tests on node 10
while its still maintained and drop in the next
major release

* update depcheck

* remove npm-install job
2020-08-18 19:28:58 +01:00
alex4200
b97fce43c7 Add quickstart section to readme (#5370)
* Update README.md

Added sentence to make it more clear how to select and use a badge to add to a user's github repo.

* Update README.md

* Reformat

Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
Co-authored-by: Paul Melnikow <email@paulmelnikow.com>
2020-08-10 22:37:53 -05:00
Pierre-Yves B
3a8528493a Update Node.js versions in README (#5410) 2020-08-09 08:51:34 +02:00
chris48s
dd958efae5 Community/sponsors page (#5155) 2020-06-17 19:11:14 +01:00
Paul Melnikow
778b146d8e Update list of who has access to production resources (#5192)
This action item was requested at the ops team meeting.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-06-14 20:09:04 +00:00
chris48s
8dee584f44 update 'operations' section in README (#5156)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-06-02 18:36:28 +00:00
chris48s
3ba05cb184 📦 version 3 (#4756)
* Validate input to BadgeFactory.create() (#3875)

* validate input to create()

* remove deprecated properties (#3881)

* remove BadgeFactory class (#3884)

* Template literal templates (#4459)

- Remove use of the doT template library and move to generating SVG output using javascript template literals.
- Drop SVGO and mostly manually implement the optimisations.
- Add a bunch more tests

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>

* drop raster support in package CLI (#4523)

* drop raster support in package CLI
* update docs

* rename gh-badges package to badge-maker

* rename gh-badges dir to badge-maker

* update relative imports and other refs to in parent dir

'gh-badges' --> 'badge-maker'

* update snyk service tests

This change is only tangentially related

We've used the shields repo as an example for these tests so
moving files around in our repo has a knock-on effect on them

* add missing type hints to dev style page

* write the changelog/migration guide for v3

* use extension in README CLI example

* update CLI help

whoops - missed this in #4523

* bump version

* update for self-hosting users

* README updates

* drop .format param from CLI, always output SVG

* Change text[] to label and message, Remove JSON output

- Change text[] to label and message
- Fix message only badge
- Remove JSON output format
- Update the docs

* update package-lock

* rename 'template' to 'style'

* handle invalid styles in coalesceBadge

* ensure makeBadge is passed a string for template in coalesceBadge()

issue #4925

* fix (logo/no label text/label color specified) case

issue #4926

* add example of (logo/no label text/label color specified) to style debug page

* update type defs

* padding fix for FTB style

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-04-23 20:05:48 +01:00
Caleb Cartwright
5a4f705e8f fix [GitHubHacktoberfest] service test (#4299)
* tests: fix hacktoberfest service test

* tests: update message for post-hacktoberfest, add couple unit tests

* chore: lgtm fix

* tests: fix unit test
2019-11-06 04:47:56 -06:00
Caleb Cartwright
5f0253ae5c chore: add hacktoberfest badge :) (#4115) 2019-10-03 08:57:33 -05:00
Jan Keromnes
2f8704f0dc Improve Gitpod automated setup (#3880)
* Gitpod is no longer in Beta

* Automatically open the web preview on start-up in Gitpod

* Accelerate Gitpod start-up with continuously prebuilt workspaces

* Install Prettier VS Code extension in Gitpod
2019-08-29 18:17:03 +00:00
Paul Melnikow
2177eb7546 Docs: Drop .svg extensions (#3787) 2019-07-25 19:39:35 -05:00
chris48s
38cdc0033f adopt JSDoc, eslint-plugin-jsdoc (#3645)
eslint-plugin-jsdoc:
- install eslint-plugin-jsdoc
- config file
- fix lint/style errors

JSDoc:
- add JSDoc as a dev dependency
- get everything rendering nicely with JSDoc
- config, build command + ignores
2019-07-11 20:14:47 +01:00
Marcin Mielnicki
283601423f Redirect an old png badge with a number as a color; test on [static] (#3412)
Fixes https://github.com/badges/shields/issues/3260

Problem happens when a value of a color in an old PNG static badge is a number: http://localhost:8080/my-label/my-message.png?color=1. In this case `color` in `queryParams` is a number. 
0a0b5b3f03/core/server/server.js (L203-L212)

Surprisingly service test listed below is passing currently on master - value `1` is represented in `queryParams` as a String (only in test). 
`services/static-badge/static-badge.tester.js`
```js
t.create('Old static badge with a number as a color')
  .get('/foo/bar.png?color=1', { followRedirect: false })
  .expectStatus(301)
  .expectHeader('Location', '/badge/foo-bar-1.png')
```

Moreover I added some code + description allowing to debug server.
2019-05-08 12:33:43 -04:00
Paul Melnikow
73ed7778fd Automatically reload the server when it changes (#3401)
While working on #2428 I found myself wanting to reload the server frequently. This is working great and reducing my iteration time significantly. I should have tackled this way sooner! 🙊 

I’ve left `verbose` on which seems useful, at least in the short term while we’re tuning the configuration.

Close #2426
2019-05-01 16:39:25 -04:00
Pierre-Yves B
2806eb8a00 Legacy services clean up (#3367)
* Deleted remaining legacy service bits

* Removed badge from README

* Removed no longer needed try/catch

* Deleted refactoring script

* Switched to const

* Reinstated doc

* Ran Prettier
2019-04-27 19:25:01 +01:00
Paul Melnikow
066193c002 Readme: Update node compatibility (#3330) 2019-04-17 15:15:46 -04:00
Paul Melnikow
e3d115cf99 Rename maxAge to cacheSeconds (#3090)
Close #3069
2019-02-23 20:33:38 -05:00
Paul Melnikow
d2861b2438 Switch to npm ci (#3034) 2019-02-18 17:28:09 -06:00
Owen Voke
dd6ee70802 Update from RawGit to local path (#2952) 2019-02-07 12:44:51 -05:00
Paul Melnikow
da5fd26847 Readme: Repair link to logo (#2945) 2019-02-06 19:15:16 -06:00
Paul Melnikow
d8ce045ead Adopt Gatsby (#2906)
While Next.js can handle static sites, we've had a few issues with it, notably a performance hit at runtime and some bugginess around routing and SSR. Gatsby being fully intended for high-performance static sites makes it a great technical fit for the Shields frontend. The `createPages()` API should be a really nice way to add a page for each service family, for example.

This migrates the frontend from Next.js to Gatsby. Gatsby is a powerful tool, which has a bit of downside as there's a lot to dig through. Overall I found configuration easier than Next.js. There are a lot of plugins and for the most part they worked out of the box. The documentation is good.

Links are cleaner now: there is no #. This will break old links though perhaps we could add some redirection to help with that. The only one I’m really concerned about `/#/endpoint`. I’m not sure if folks are deep-linking to the category pages.

There are a lot of enhancements we could add, in order to speed up the site even more. In particular we could think about inlining the SVGs rather than making separate requests for each one.

While Gatsby recommends GraphQL, it's not required. To keep things simple and reduce the learning curve, I did not use it here.

Close #1943 
Fix #2837 Fix #2616
2019-02-06 16:37:55 -05:00
Paul Melnikow
84e5d58d9b Add CLI for debugging badges (#2930)
Often when responding to bug reports it would be helpful to easily run an example failing badge URL. It takes a while to do that, because you have to copy and paste just the right part of the badge URL. This works on `img.shields.io` links as well as partial paths and should make this really easy. 💨
2019-02-05 21:47:30 -05:00
Pierre-Yves B
ea833a83c4 [GitHubCommitActivity] improvements and examples (#2920) 2019-02-04 20:27:52 -05:00
Paul Melnikow
3a7bddbc26 Consolidate service definition schema, removing support for previewUrl (#2895)
This removes `LONG_CACHE` and its descendants, which was a feature that added `?maxAge` to the live preview badges in the frontend. Since they are all static that is no longer needed, as the static badges all have longer cache timeouts regardless.
2019-01-30 18:35:11 -06:00
Jan Keromnes
36956897e9 Make code contributions easier with Gitpod (#2783)
Ref #2772
2019-01-21 11:44:53 -05:00
Paul Melnikow
394a411127 Showcase two of our distinguishing features (#2705) 2019-01-14 18:54:42 -05:00