-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable @mayakr cards instead of remove
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Generate json form maykar.""" | ||
from customjson.defaults import REUSE, VISIT | ||
|
||
|
||
def get_data(github, selected_repos): | ||
"""Generate json form maykar.""" | ||
org = 'maykar' | ||
data = {} | ||
repos = [] | ||
all_repos = ['compact-custom-header'] | ||
if selected_repos: | ||
for repo in selected_repos: | ||
if repo in all_repos: | ||
repos.append(repo) | ||
else: | ||
repos = all_repos | ||
for repo in repos: | ||
try: | ||
repo = github.get_repo(org + '/' + repo) | ||
name = repo.name | ||
print("Generating json for:", "{}/{}".format(org, name)) | ||
|
||
release = list(repo.get_releases())[0] | ||
|
||
updated_at = repo.updated_at.isoformat().split('T')[0] | ||
|
||
version = release.tag_name | ||
|
||
remote_location = REUSE.format(org, name, name) | ||
remote_location = remote_location + '.js' | ||
|
||
visit_repo = VISIT.format(org, name) | ||
|
||
changelog = release.html_url | ||
|
||
data[name] = {} | ||
data[name]['updated_at'] = updated_at | ||
data[name]['version'] = version | ||
data[name]['remote_location'] = remote_location | ||
data[name]['visit_repo'] = visit_repo | ||
data[name]['changelog'] = changelog | ||
except Exception: # pylint: disable=W0703 | ||
pass | ||
return data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""Version.""" | ||
MAJOR = 2 | ||
MINOR = 4 | ||
PATCH = 0 | ||
PATCH = 1 | ||
FORMAT = "{}.{}.{}" | ||
__version__ = FORMAT.format(str(MAJOR), str(MINOR), str(PATCH)) |