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

Run awesome-lint on new additions #1962

Merged
merged 14 commits into from
Apr 19, 2021
Merged

Run awesome-lint on new additions #1962

merged 14 commits into from
Apr 19, 2021

Conversation

RayBB
Copy link
Contributor

@RayBB RayBB commented Mar 8, 2021

Note: This PR is a repeat of #1851 since the fork or original fork was deleted. This PR address comments there.

I really appreciate this project and wanted to try to give back so it's a little easier for everyone involved.
To that end, I created this PR to automatically lint new lists when someone opens a PR to add them.

Benefits

  • It will save time of maintainers by allowing them to look at the error message first
  • It will provide immediate feedback to people who make a PR
  • It helps people having trouble installing awesome-lint
  • It is free

Risks

  • As far as I know, there is no risk to users or maintainers.

What it does

  • PR will lint NEW lists that are requesting to be added.
  • PR will NOT lint this repo itself. If that functionality is desired it can happen in a separate PR (see Lint with awesome-lint via GitHub Actions #1794).
  • PR will NOT lint the current lists in the readme.

How it does it

This PR creates a GitHub action that will do the following every time a new commit is pushed to an open PR:

  1. Find the URL that is being added using git diff
  2. Clone that repo
  3. Run awesome-linton that repo.

The above 3 steps will ONLY run if readme.md is changed.
If readme is changed and no new URL is detected in the readme it will NOT fail with a helpful error message.
Error can be ignored if it is a cosmetic PR

Here are examples of failing commits.

Final notes

"Squash and Merge" this PR or let me know and I will squash it manually.

Feel free to edit this any way you see fit or ask me to make the edits. 👍
If there are any questions on how this works drop them here and I'll try my best to answer.

Again, thanks so much for all the hard work the maintainers put into this repo! 👏

@RayBB
Copy link
Contributor Author

RayBB commented Apr 11, 2021

@sindresorhus have I addressed your concerns?

@sindresorhus sindresorhus changed the title auto awesome-lint any list added to the readme in a PR (again) Run awesome-lint on new additions Apr 19, 2021
@sindresorhus sindresorhus merged commit ec96722 into sindresorhus:main Apr 19, 2021
@sindresorhus
Copy link
Owner

Thanks :)

@sindresorhus
Copy link
Owner

Copy link

@Tolito20 Tolito20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Galván Gómez

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.

3 participants