Closed martbhell closed 8 years ago
$ ./tools/anynewcommits https://github.com/CSC-IT-Center-for-Science/fgci-ansible/compare/7f2114cfe8dd9e34e958ad273cef823f7ce494d0...e6e7333c6ead779fae8d59702e7ee946cf722f2f
Maybe it's enough to just print a URL like above? Anybody got a name suggestion?
syntax in URL is:
https://github.com/CSC-IT-Center-for-Science/fgci-ansible/compare/{{ LATEST_COMMIT_IN_LOCAL_CLONE }}...{{ LATEST_COMMIT_ON_GITHUB }}
I think this could be quite useful for users of this role - before they do a git pull, they can view this URL to see all the changes.
Latest commit on github we can find with this API call: https://api.github.com/repos/CSC-IT-Center-for-Science/fgci-ansible/git/refs/heads/master
Latest commit in local repo should be in .git perhaps or one can run this git command: git rev-parse HEAD
The script also needs to check what branch is used.
Maybe it's enough to just print a URL like above? Anybody got a name suggestion?
syntax in URL is:
I think this could be quite useful for users of this role - before they do a git pull, they can view this URL to see all the changes.
Latest commit on github we can find with this API call: https://api.github.com/repos/CSC-IT-Center-for-Science/fgci-ansible/git/refs/heads/master
Latest commit in local repo should be in .git perhaps or one can run this git command: git rev-parse HEAD
The script also needs to check what branch is used.