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

[BUG] Reddit links result in 403 when run in Github Actions #76

Open
yogan opened this issue Jul 12, 2024 · 2 comments
Open

[BUG] Reddit links result in 403 when run in Github Actions #76

yogan opened this issue Jul 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yogan
Copy link

yogan commented Jul 12, 2024

Describe the bug
Checking locally works find, but running in Github Actions leads to a 403.

To Reproduce
Example README.md:

Redditor [u/Boojum](https://old.reddit.com/user/Boojum) has crafted a nice 
[surprise input](https://old.reddit.com/r/adventofcode/comments/18firip/2023_day_10_an_alternate_input_to_visualize/).

Relevant output from run in GitHub Action:

🚫 2023/day-10-python/README.md, https://old.reddit.com/user/Boojum , 403, 24, null
🚫 2023/day-10-python/README.md, https://old.reddit.com/r/adventofcode/comments/18firip/2023_day_10_an_alternate_input_to_visualize/ , 403, 25, null

I thought it might have to do with old.reddit.com, but this rewrite rule in .linkspector.yml did not help:

replacementPatterns:
  - pattern: "https?://old.reddit.com"
    replacement: 'https://www.reddit.com'

I'm not sure how I can get more details (e.g. headers) to see what is different locally and in GitHub Actions. I'll gladly provide more details if I can get some hints on how to get them.

@yogan yogan added the bug Something isn't working label Jul 12, 2024
yogan added a commit to yogan/advent-of-code that referenced this issue Jul 12, 2024
yogan added a commit to yogan/advent-of-code that referenced this issue Jul 12, 2024
@gaurav-nelson
Copy link
Contributor

gaurav-nelson commented Jul 15, 2024

Since the response is 403 forbidden, I think Reddit is blocking IP addresses from GitHub. One workaround can be adding proxy setting options for Linkspector, but unless users use a paid proxy I am not sure how reliable the results will be.

@yogan
Copy link
Author

yogan commented Jul 15, 2024

Ah, I see. For me personally, that is not worth the effort. Feel free to close this issue.

I have disabled checking of Reddit links in GitHub Actions with a separate config file that has an ignore rule:

ignorePatterns:
  - pattern: '^https://(old\.|www\.)?reddit\.com'

and a run step with npx @umbrelladocs/linkspector check --config .linkspector-github.yml in my workflow yaml.

Locally I can still check everything every now and then. That's good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants