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

CI: Update license & gitignore by cron #14419

Merged
merged 5 commits into from
Jan 23, 2021

Conversation

a1012112796
Copy link
Member

@a1012112796 a1012112796 commented Jan 22, 2021

close #12684

follow go-gitea#12684

Signed-off-by: a1012112796 <1012112796@qq.com>
@lunny
Copy link
Member

lunny commented Jan 22, 2021

You should check if there are real changes.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 22, 2021
@a1012112796
Copy link
Member Author

You should check if there are real changes.

Hmm, How about this way?

diff --git a/.drone.yml b/.drone.yml
index 8aaf5c7e6..280cdba9a 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -457,6 +457,7 @@ trigger:
   image: golang:1.15
   commands:
     - timeout -s ABRT 40m make generate-license generate-gitignore
+    - git diff --quiet && ( echo 'not need update'; exit 1)
 
 - name: push
   pull: always

@lunny
Copy link
Member

lunny commented Jan 22, 2021

You should check if there are real changes.

Hmm, How about this way?

diff --git a/.drone.yml b/.drone.yml
index 8aaf5c7e6..280cdba9a 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -457,6 +457,7 @@ trigger:
   image: golang:1.15
   commands:
     - timeout -s ABRT 40m make generate-license generate-gitignore
+    - git diff --quiet && ( echo 'not need update'; exit 1)
 
 - name: push
   pull: always

If there is no change, the second push step should not be run

@techknowlogick
Copy link
Member

@lunny the git push plugin is smart and if there are no changes then it won't commit or push anything. See our current translations pipeline for example.

@lunny
Copy link
Member

lunny commented Jan 22, 2021

So why we need a cron job for not like we did on translations?

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Jan 22, 2021
@a1012112796
Copy link
Member Author

So why we need a cron job for not like we did on translations?

Because they not change frequently like translation file. so I think do it monthly by cron job is better.

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

like it ...

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 22, 2021
@6543 6543 changed the title proposal: do generate-license & generate-gitignore by cron CI: Update license & gitignore by cron Jan 22, 2021
@6543 6543 added this to the 1.14.0 milestone Jan 22, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 23, 2021
@6543
Copy link
Member

6543 commented Jan 23, 2021

🚀

@6543 6543 merged commit 6764e8f into go-gitea:master Jan 23, 2021
@6543
Copy link
Member

6543 commented Jan 23, 2021

Screenshot at 2021-01-23 03-54-34
added ...

@a1012112796 a1012112796 deleted the update_gitignore branch January 23, 2021 03:05
a1012112796 added a commit to a1012112796/gitea that referenced this pull request Jan 25, 2021
* master: (358 commits)
  [skip ci] Updated translations via Crowdin
  Use caddy's certmagic library for extensible/robust ACME handling (go-gitea#14177)
  Redirect on changed user and org name (go-gitea#11649)
  chore: bump minio to RELEASE.2021-01-16T02-19-44Z (go-gitea#14445)
  [skip ci] Updated translations via Crowdin
  CI: skip build steps for cron update works (go-gitea#14443)
  [skip ci] Updated licenses and gitignores
  [skip ci] Updated translations via Crowdin
  just overload to not get it by mistake again ... (go-gitea#14440)
  [skip ci] Updated translations via Crowdin
  Add link to packages in openSUSE build service (go-gitea#14439)
  Improve Description in new/ edit Project template (go-gitea#14429)
  Don't show "Reference in new issue" when issues unit is globally disabled (go-gitea#14437)
  CI: Update license & gitignore by cron (go-gitea#14419)
  Fix close/reopen with comment (go-gitea#14436)
  Add german translation guidelines (go-gitea#14283)
  [skip ci] Updated translations via Crowdin
  Fix lfs preview bug (go-gitea#14428)
  [skip ci] Updated translations via Crowdin
  Bump gsap from 3.5.1 to 3.6.0 (go-gitea#14410)
  ...
a1012112796 added a commit to a1012112796/gitea that referenced this pull request Jan 25, 2021
* master: (542 commits)
  [skip ci] Updated translations via Crowdin
  Use caddy's certmagic library for extensible/robust ACME handling (go-gitea#14177)
  Redirect on changed user and org name (go-gitea#11649)
  chore: bump minio to RELEASE.2021-01-16T02-19-44Z (go-gitea#14445)
  [skip ci] Updated translations via Crowdin
  CI: skip build steps for cron update works (go-gitea#14443)
  [skip ci] Updated licenses and gitignores
  [skip ci] Updated translations via Crowdin
  just overload to not get it by mistake again ... (go-gitea#14440)
  [skip ci] Updated translations via Crowdin
  Add link to packages in openSUSE build service (go-gitea#14439)
  Improve Description in new/ edit Project template (go-gitea#14429)
  Don't show "Reference in new issue" when issues unit is globally disabled (go-gitea#14437)
  CI: Update license & gitignore by cron (go-gitea#14419)
  Fix close/reopen with comment (go-gitea#14436)
  Add german translation guidelines (go-gitea#14283)
  [skip ci] Updated translations via Crowdin
  Fix lfs preview bug (go-gitea#14428)
  [skip ci] Updated translations via Crowdin
  Bump gsap from 3.5.1 to 3.6.0 (go-gitea#14410)
  ...
@6543 6543 added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 11, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest auto do generate-license & generate-gitignore
5 participants