Skip to content

Commit

Permalink
am
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Oct 5, 2024
1 parent 165e5d7 commit 645909b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/brokenurl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
brokenurl:
if: github.repository == 'SchemaStore/schemastore'
runs-on: 'ubuntu-latest'
permissions: 'write-all'
# issues: 'write'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-node@v4'
Expand All @@ -18,12 +20,8 @@ jobs:
cache: 'npm'
cache-dependency-path: './package-lock.json'
- run: 'npm clean-install'
- run: |
echo "this is body 2" | gh issue edit 4128 --body-file -
env:
GH_TOKEN: '${{ github.token }}'
# - run: 'node ./cli.js maintenance'
- name: 'Update comment'
uses: 'peter-evans/create-or-update-comment@v4'
permissions:
issues: 'write'
with:
comment-id: 2394972665
body: |
**Edit:** Some additional info
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,13 +766,13 @@ async function taskMaintenance() {
forEachCatalogUrl(async (url) => {
if (url.startsWith(UrlSchemaStore)) return

await fetch(url, { method: 'HEAD' })
await fetch(url, { method: 'HEAD' })
.then((res) => {
// eslint-disable-line promise/always-return

if (!res.ok) {
console.info(`NOT OK (${res.status}/${res.statusText}): ${url}`)
}

return undefined
})
.catch((err) => {
console.info(`NOT OK (${err.code}): ${url}`)
Expand Down

0 comments on commit 645909b

Please sign in to comment.