Skip to content

Commit

Permalink
Add workflow to periodically check for broken links (#135)
Browse files Browse the repository at this point in the history
* Add workflow to periodically check for broken links

* Update README
  • Loading branch information
logan-stytch authored Jul 24, 2023
1 parent 80da111 commit 0319d25
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 13 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check links in README.md

on:
schedule:
# Every 4 hours at X:00
- cron: "0 */4 * * *"
workflow_dispatch:

jobs:
check-links:
runs-on: ubuntu-latest
name: Check links in README.md
steps:
- uses: actions/checkout@v3

- name: Get links
run: |
grep -Eo "\[[^][]+]\((https?://stytch.com[^()]+)\)" README.md | grep -Eo "https:[^)]*" | sort -u > links.txt
found_bad=0
for link in $(cat links.txt); do
status_code=$(curl -s -o /dev/null -w "%{http_code}" $link)
if [[ "$status_code" != "200" ]]; then
echo "$link -> $status_code"
found_bad=1
fi
done
if [[ $found_bad == 1 ]]; then
exit 1
fi
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@ It pairs well with the Stytch [Web SDK](https://www.npmjs.com/package/@stytch/st
## Install

```console
$ go get github.com/stytchauth/stytch-go/v9
$ go get github.com/stytchauth/stytch-go/v10
```

## Usage

You can find your API credentials in the [Stytch Dashboard](https://stytch.com/dashboard/api-keys).

This client library supports all of Stytch's live products:
This client library supports all Stytch's live products:
- [x] [Email Magic Links](https://stytch.com/docs/api/send-by-email)
- [x] [Embeddable Magic Links](https://stytch.com/docs/api/create-magic-link-overview)
- [x] [OAuth logins](https://stytch.com/docs/api/oauth-overview)
- [x] [Embeddable Magic Links](https://stytch.com/docs/guides/magic-links/embeddable-magic-links/api)
- [x] [OAuth logins](https://stytch.com/docs/guides/oauth/idp-overview)
- [x] [SMS passcodes](https://stytch.com/docs/api/send-otp-by-sms)
- [x] [WhatsApp passcodes](https://stytch.com/docs/api/whatsapp-send)
- [x] [Email passcodes](https://stytch.com/docs/api/send-otp-by-email)
- [x] [Session Management](https://stytch.com/docs/api/sessions-overview)
- [x] [WebAuthn](https://stytch.com/docs/api/webauthn-overview)
- [x] [User Management](https://stytch.com/docs/api/users)
- [x] [Time-based one-time passcodes (TOTP)](https://stytch.com/docs/api/totps-overview)
- [x] [Crypto wallets](https://stytch.com/docs/api/crypto-wallet-overview)
- [x] [Passwords (Beta)](https://stytch.com/docs/api/password-overview)
- [x] [Session Management](https://stytch.com/docs/guides/sessions/using-sessions)
- [x] [WebAuthn](https://stytch.com/docs/guides/webauthn/api)
- [x] [Time-based one-time passcodes (TOTPs)](https://stytch.com/docs/guides/totp/api)
- [x] [Crypto wallets](https://stytch.com/docs/guides/web3/api)
- [x] [Passwords](https://stytch.com/docs/guides/passwords/api)


### Example usage
Create an API client:
```go
import (
"context"

"github.com/stytchauth/stytch-go/v9/stytch"
"github.com/stytchauth/stytch-go/v9/stytch/b2c/stytchapi"
"github.com/stytchauth/stytch-go/v10/stytch"
"github.com/stytchauth/stytch-go/v10/stytch/b2c/stytchapi"
)

stytchAPIClient, err := stytchapi.NewClient(
Expand Down Expand Up @@ -130,7 +130,7 @@ If you've found a bug, [open an issue](https://github.com/stytchauth/stytch-go/i

If you have questions or want help troubleshooting, join us in [Slack](https://join.slack.com/t/stytch/shared_invite/zt-nil4wo92-jApJ9Cl32cJbEd9esKkvyg) or email [email protected].

If you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/security).
If you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/resources/security-and-trust/security#:~:text=Responsible%20disclosure%20program).

## Development

Expand Down

0 comments on commit 0319d25

Please sign in to comment.