8000 fix: copyright license script by Panquesito7 · Pull Request #28 · TheAlgorithms/scripts · GitHub
[go: up one dir, main page]

Skip to content

fix: copyright license script #28

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

Merged
merged 3 commits into from
Jul 3, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions license_copyright/license.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: 'Update copyright license'
description: Update license years automatically
description: Updates copyright license year automatically
author: "TheAlgorithms"
inputs:
filename:
description: License file name
description: "License filename"
required: true
default: LICENSE
initial_year:
description: Year of the repository's creation
description: "Year of the repository's creation"
required: true
default: 2016
runs:
Expand All @@ -27,11 +27,12 @@ runs:
run: |
git checkout -b license-update-${{ github.sha }}
git commit -m "docs: updating copyright license year"
git push
git push origin license-update-${{ github.sha }}:license-update-${{ github.sha }} || true
- name: Creating and merging the PR
shell: bash
run: |
if [[ `git status --porcelain` ]]; then
gh pr create --base master --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).'
if [[ $(git log --branches --not --remotes) ]]; then
gh pr create --base ${GITHUB_REF##*/} --head license-update-${{ github.sha }} --title 'docs: updating `License` copyright' --body 'Updated License copyright (see the diff. for changes).' || true
fi
env:
GH_TOKEN: ${{ github.token }}
0