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

Issue #1076: added comment header for all files in the project corres… #1087

Closed
wants to merge 2 commits into from

Conversation

Suz99
Copy link

@Suz99 Suz99 commented Jan 14, 2025

…ponding styles for each type of files such as for .py it is //SPDX-License-Identifier: AGPL-3.0-or-later and so on

Contributor checklist


Description

Added a pre-commit hook to the project so that every time a project member commits a file, the comment will automatically be shown as a header.

Related issue

…oject corresponding styles for each type of files such as for .py it is //SPDX-License-Identifier: AGPL-3.0-or-later and so on

Signed-off-by: Suzana <[email protected]>
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit b765fe9
🔍 Latest deploy log https://app.netlify.com/sites/activist-org/deploys/678700bb1b08fc000860559b
😎 Deploy Preview https://deploy-preview-1087--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

Thank you for the pull request!

The activist team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Development rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The TypeScript and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

First PR Commit Check

  • The commit messages for the remote branch of a new contributor should be checked to make sure their email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo (can be set with git config --global user.email "GITHUB_EMAIL")

@andrewtavis
Copy link
Member

Hey @Suz99 👋 Thanks for the expansion here :) The shell script does a lot of changes to the files that in some cases are breaking 🤔 I also decided that I'd prefer if __init__.py not get this notice as I don't think we need to license an empty file. Would you be able to revert these changes?

I wrote utils/check_license.py to check the work in #1076. Would you maybe want to call that in a pre-commit hook and add it to the ones that run on commit? Any other ideas on how to expand this?

@Suz99
Copy link
Author

Suz99 commented Jan 15, 2025

Hi @andrewtavis! I see the errors it is that the HTML and JSON have also got this comment I can revert that and I can revert the change for __init__.py.

Regarding the utils/check_license.py, We can add a new script in the .git/hooks/pre-commit directory to invoke check_license.py every time a commit is made. This will check all staged files for the correct SPDX header and block the commit if any files are missing or have incorrect headers.
We might need to adjust check_license.py to make it suitable for a pre-commit environment like returning a non-zero exit code if it finds files without the required headers.
Hope this suggestion works, please let me know what the next steps are.

@Suz99 Suz99 closed this Jan 15, 2025
@andrewtavis
Copy link
Member

I think the suggestions above make sense, @Suz99! Feel free to reopen this PR with the changes or send a new one along :)

@Suz99
Copy link
Author

Suz99 commented Jan 19, 2025

Hi Andrew! I was going to make the PR but this issue is closed

@andrewtavis
Copy link
Member

Yes it's already been covered by another contributor. Sorry that it couldn't work out!

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