Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't remove the lychee config file #255

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

dmathieu
Copy link
Contributor

This fixes the removal of unncessary files, which currently removes too much, as it removes the config file. But also the lychee-bin and lychee-lib files:

$ touch lychee-bin; git status; rm -f lychee*!(lychee-bin|lychee-lib); git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
(use "git add ..." to include in what will be committed)
lychee-bin

nothing added to commit but untracked files present (use "git add" to track)
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
(use "git add/rm ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
deleted: lychee.toml

no changes added to commit (use "git add" and/or "git commit -a")

Here, we can see that not only the lychee-bin file has been removed, but the lychee.toml file has been removed too (which prevents the action from running properly).

Now, with my new command:

touch lychee-bin; touch lychee-bar; git status; rm -f lychee!(-bin|-lib|*.toml); git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
(use "git add ..." to include in what will be committed)
lychee-bin
lychee-bar

nothing added to commit but untracked files present (use "git add" to track)
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
(use "git add ..." to include in what will be committed)
lychee-bin

nothing added to commit but untracked files present (use "git add" to track)

Note: I tried running this as rm -f lychee!(lychee-bin|lychee-lib|*.toml), but for some reason, the bin and lib files were still being deleted.

@mre
Copy link
Member

mre commented Oct 10, 2024

Thanks for the fix!

@dmathieu dmathieu deleted the fix-rm-lychee branch October 10, 2024 18:06
dmathieu added a commit to open-telemetry/opentelemetry-go-contrib that referenced this pull request Oct 11, 2024
…6229)

Reverts #6220

lychee-action has a regression in v2, where it deletes the config file,
and we therefore try checking links for templates that shouldn't be
checked.
See lycheeverse/lychee-action#255
pellared pushed a commit to open-telemetry/opentelemetry-go-contrib that referenced this pull request Nov 14, 2024
…6323)

Lychee's `cache-exclude-status` option has shipped. So we can use it
rather than ignore 429s.
This also upgrades lychee-action to 2.1.0. We had to revert that in
#6229 due
to a regression, which was fixed in
lycheeverse/lychee-action#255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants