-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Revision-date updates all files. #10
Comments
Hi @lyz-code, Good to hear you're happy with the plugin! Trying to understand if something is going wrong or not. What this plugin does, is on So I checked if there are any pages with incorrect timeago stamps. Let's take one file as an example:
The last commit on iam_commands.md was earlier, on 12 Feb 2020 10:36 GMT. After some more searching, I realised that the date is actually the timestamp when the deploy script ran. This is likely because of these lines in the plugin: unix_timestamp = self.g.log(path, n=1, date='short', format='%at')
if not unix_timestamp:
unix_timestamp = datetime.now().timestamp()
print('WARNING - %s has no git logs, using current timestamp' % path) Basically, the git repository cannot be properly accessed, and the current datetime is taken. The logs should show a lot of warnings. Unfortunately, I cannot view the logs of your build ('We are currently unable to download the log. Please try again later.'). Probably, the root cause is that the github action steps:
- uses: actions/checkout@v2
with:
# Number of commits to fetch. 0 indicates all history.
# Default: 1
fetch-depth: 0 Let me know if that solves it. I will make sure to update the docs and the warning message accordingly to help future users. |
It worked perfectly. Thank you for the quick and throughout analysis ^^ |
I tried writing a unit test for this. I had assumed the shallow git fetch-depth of 1 would have caused this line to return a unix_timestamp = self.g.log(path, n=1, date='short', format='%at') and thus print these warnings: if not unix_timestamp:
unix_timestamp = datetime.now().timestamp()
print('WARNING - %s has no git logs, using current timestamp' % path) I looked at the logs of your build job, and there's no warnings. I couldn't reproduce this locally. I've already updated the But determining the |
Hi, first of all, thanks for your plugin.
I'm deploying my wiki with this github workflow. And if I change one file of the whole repository, the date get's changed in all the files.
So for example, this commit triggered this job which produced this gh-pages commit.
As you can see, the timestamp is modified in all files:
Do you know why is this happening?
Thanks
The text was updated successfully, but these errors were encountered: