-
-
Notifications
You must be signed in to change notification settings - Fork 46
Update copyright license script #22
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
Update copyright license script #22
Conversation
Panquesito7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could potentially make it a usable and configurable action (like this one).
What do you think about that? 🤔
Overall, it's looking great, though. Thanks. 🙂
|
@Panquesito7 This is a good idea! But what actually could be configurable there? |
Hmm, that's right. I guess it's a good idea to stick to this. 👍 |
Panquesito7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🚀
license_copyright/license.yml
Outdated
| run: | | ||
| (echo "Copyright (C) 2016-$(date +"%Y") TheAlgorithms and contributors"; tail -n +2 License) > License.tmp | ||
| mv License.tmp License |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| run: | | |
| (echo "Copyright (C) 2016-$(date +"%Y") TheAlgorithms and contributors"; tail -n +2 License) > License.tmp | |
| mv License.tmp License | |
| run: | | |
| (echo "Copyright (C) 2016-$(date +"%Y") TheAlgorithms and contributors"; tail -n +2 LICENSE) > License.tmp | |
| mv License.tmp LICENSE |
However, since you're making this more general as an action - I would recommend to make this a variable instead of License or LICENSE since the license file can be named in myriad of ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some repositories also use LICENSE.txt or LICENSE.md (that's what I use).
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
tjgurwara99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a patch (suggested change) in a comment to what I mean by the following. What you had created was a per repository workflow which couldn't be used in a different repository for various reasons. The patch shows you how you can make it so that other workflow files can call this exact workflow similar to the way you were calling uses: stefanzweifel/git-auto-commit-action@v4. I've removed the use of stefanzweifel/git-auto-commit-action@v4 because I don't think we need that kind of hammer for a problem that you can use your thumb for 😄 plus I prefer less dependencies so there is less chance for them to go wrong.
|
There are a few other changes that I would like you to make but to explain them over PR would be difficult. I've made those changes in the attached Let me know if you didn't understand something inside this patch 😄 Once you apply the patch, you should have 3 changed files, commit them to your fork, push your changes and run the workflow by going to your Actions tab and the update-license with the dispatch trigger. That way you can see it works the way you expect your workflow to work. |
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Panquesito7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! Thank you. 🚀
|
Would you like to add these in the C/C++ repositories, or should we create an issue to have it open to someone else? @alexpantyukhin. |
|
@Panquesito7 I think I can do it. What is the best way to do this? Just copy this script into the |
|
I think we need to it similar to this: - name: Filename Formatter
uses: TheAlgorithms/scripts/formatter@main
with:
filetypes: .c,.hHowever, let's wait a bit. I think there's something wrong with the script, not 100% sure, though. |
add Update copyright license