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

script for making release comments based on commit history #4011

Closed
zeffii opened this issue Apr 2, 2021 · 2 comments
Closed

script for making release comments based on commit history #4011

zeffii opened this issue Apr 2, 2021 · 2 comments

Comments

@zeffii
Copy link
Collaborator

zeffii commented Apr 2, 2021

the following script is based on the existing show commits operator in Sverchok.

import os
import urllib
import urllib.request
import sverchok
from sverchok.utils import sv_requests as requests

COMMITS_LINK = 'https://api.github.com/repos/nortikin/sverchok/commits'

def report(comment, message):
    print(message)
    #for line in comment:
    #    print('    ' + line)

def get_commits(num_links=5):
    r = requests.get(COMMITS_LINK)
    json_obj = r.json()

    print("author | commit details")
    print("--- | ---")

    for i in range(num_links):
        commit = json_obj[i]['commit']
        comment = commit['message'].split('\n')

        sha = os.path.basename(json_obj[i]['commit']['url'])[:7]
        author = commit['author']['name']
        # user = commit['committer']['name']
        comment = comment[0] + '...' if len(comment) else ''

        report(comment, f'{author} | {comment} sha: {sha}')
    
    # print(json_obj)


get_commits(num_links=30)

it produces the following readout.

author commit details
nikitron Update gcode_exporter.rst... sha: 12fa823
nikitron Update gcode_exporter.rst... sha: 6417f5e
nikitron Update gcode_exporter.rst... sha: e7c4896
nikitron Merge pull request #4009 from nortikin/2021_gcode_revieling... sha: 86a018a
nortikin docs... sha: 9a580d8
nikitron Merge pull request #3947 from nortikin/2021_gcode_revieling... sha: efa4e59
nortikin Gcode docs... sha: 64b5aec
nortikin Merge branch 'master' into 2021_gcode_revieling... sha: afff67e
Victor Doval Partial menus (#4008)... sha: 8bef791
Victor Doval Merge pull request #4007 from stansu/patch-3... sha: 0a2e868
Victor Doval Merge pull request #4006 from stansu/patch-2... sha: 68bfbaa
stansu fixing some typo... sha: 4bacd8a
stansu correct typo... sha: cc73159
Victor Doval fixes #3987 (#4004)... sha: 7b21a72
Victor Doval matrix out format fix (#4003)... sha: e816073
Victor Doval random_points_on_mesh_ui_fix (#4001)... sha: 23449a3
Victor Doval Random Points on Mesh Numpy Implementation (#3999)... sha: 50a35d6
Victor Doval String tools 'number to string' mode (#3998)... sha: 22b100e
Victor Doval edgenet_to_paths typofix (#3997)... sha: 1a168ae
Victor Doval Deconstruct Surface weights bugfix (#3996)... sha: f01b312
Victor Doval Control Points Output to Curve Mapper (#3994)... sha: e78e7be
Victor Doval icosphere recursived (#3993)... sha: efc6c32
Victor Doval matrix_out: nesting fix + recursive node (#3991)... sha: e71650a
Victor Doval index to mask output numpy prop (#3985)... sha: 4c9c125
Victor Doval Bounding Box Numpy (#3984)... sha: bd2bb73
Victor Doval Nearest Point on Mesh (#3982)... sha: 82af1bf
DolphinDream Merge pull request #3978 from DolphinDream/matrixOutMK2-dev... sha: 75b9b44
DolphinDream Bump Matrix Out node to MK2 .. adding same features in Quaternion Out node... sha: c49e7e9
DolphinDream Add feature to PointInside node to partition points in inside/outside... sha: e6260de
Dealga McArdle add poll to node.sv_quicklink_new_node_input (#3977)... sha: 513dd84

it can be tweaked, but I think i'll use it like this for new interim releases. ( seen as a lot of people seem to prefer downloading and installing the releases, instead of the master zip )

@zeffii zeffii closed this as completed Apr 2, 2021
@nortikin
Copy link
Owner

nortikin commented Apr 2, 2021

is it placed on some utils?
i'll prefare to replace show latest commits script with that
изображение

@zeffii
Copy link
Collaborator Author

zeffii commented Apr 3, 2021

yeah, OK, i'll change the existing "Show latest commits" to do two things

  • generate a printout using python: print() <-- easy for copying
  • generate a self.report({'INFO'}.... ) <-- easy for reading for passing interest of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants