Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Dec 1, 2024
1 parent d527b1a commit 7af5eff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ This script/repo/tool does follow the automation guidelines on the

- Outbound calls are made once from the developer's machine, and once from CI
on GitHub Actions.
- Once inputs are downloaded, they are cached locally into the inputs/ directory by `day.ts`. On GHA, this directory is cached to avoid re-requests.
- Once inputs are downloaded, they are cached locally into the inputs/ directory by `day.ts`. On GHA, this directory is cached to avoid re-requests.
- If you suspect your input is corrupted, you can manually request a fresh
copy by deleting the cached version in the inputs/ directory. You will
copy by deleting the cached version in the inputs/ directory. You will
need to change the cache key manually in GHA to cause a re-download, which
will hopefully never be needed.
- The User-Agent header in userAgentHeaderFunction() is set to me since I
Expand Down
5 changes: 3 additions & 2 deletions day.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ export async function inputs(a: MainArgs): Promise<string> {
const inputSrc = `https://adventofcode.com/${YEAR}/day/${a.day}/input`;
console.log(`Fetching ${inputSrc}`);
const headers = new Headers({
'user-agent': `github.com/hildjj/AdventOfCode${YEAR} by [email protected]`
'user-agent':
`github.com/hildjj/AdventOfCode${YEAR} by [email protected]`,
});
const res = await fetch(inputSrc, {headers});
const res = await fetch(inputSrc, { headers });
const input = await res.text();
if (!res.ok) {
console.error(res.status, res.statusText);
Expand Down

0 comments on commit 7af5eff

Please sign in to comment.