-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11df3fb
commit f5ff987
Showing
2 changed files
with
88 additions
and
0 deletions.
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,17 @@ | ||
name: "Pull from Armbian Jira" | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
jira: | ||
runs-on: ubuntu-latest | ||
name: "Get from Jira" | ||
steps: | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 #install the python needed | ||
- name: "Run script" | ||
run: | | ||
python --version |
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,71 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# automatic displaying of what is assigned to fixversion | ||
# for current and next release | ||
|
||
from jira import JIRA | ||
jira = JIRA('https://armbian.atlassian.net') | ||
|
||
from datetime import datetime | ||
month = datetime.now().strftime('%m') | ||
year = datetime.now().year | ||
|
||
def icons(arg): | ||
if str(arg) == "Bug": | ||
return ("<img alt='Bug' src=https://armbian.atlassian.net/images/icons/issuetypes/bug.svg width=24>") | ||
if str(arg) == "Task": | ||
return ("<img alt='Task' src=https://armbian.atlassian.net/images/icons/issuetypes/task.svg width=24>") | ||
if str(arg) == "Story": | ||
return ("<img alt='Story' src=https://armbian.atlassian.net/images/icons/issuetypes/story.svg width=24>") | ||
if str(arg) == "Epic": | ||
return ("<img alt=Epic'' src=https://armbian.atlassian.net/images/icons/issuetypes/epic.svg width=24>") | ||
|
||
if ( month <= "12" ): | ||
current_year=year+1 | ||
current_month="02" | ||
next_month="05" | ||
next_year=year+1 | ||
|
||
if ( month <= "11" ): | ||
current_year=year | ||
current_month="11" | ||
next_month="02" | ||
next_year=year+1 | ||
|
||
if ( month <= "08" ): | ||
current_year=year | ||
current_month="08" | ||
next_month="11" | ||
next_year=year | ||
|
||
if ( month <= "05" ): | ||
current_year=year | ||
current_month="05" | ||
next_month="08" | ||
next_year=year | ||
|
||
if ( month <= "02" ): | ||
current_year=year | ||
current_month="02" | ||
next_month="05" | ||
next_year=year | ||
|
||
# current | ||
f = open("/tmp/jira-current.html", "w") | ||
current=str(current_year)[2:]+"."+current_month | ||
f.write('<div style="color: #ccc;"><h1 style="color: #ccc;">Should be completed in '+current+'</h1>Sorted by priority<p></div>') | ||
f.write('<div style="color: #ccc;"><h5 style="color: #ccc;"><a href=https://github.com/armbian/build/pulls?q=is%3Apr+is%3Aopen+label%3A%22Needs+review%22+and+label%3A%22'+current_month+'%22>Check if you can review code that already waits at Pull reqests</a></h5></div>') | ||
f.write('<div class="icon-menu">') | ||
for issue in jira.search_issues('project=AR and fixVersion="'+current+'" and status!="Done" and status!="Closed" order by Priority', maxResults=100): | ||
f.write('<a class="icon-menu__link" href=https://armbian.atlassian.net/browse/{}>{} {}: {}, <i>Assigned to: {}</i></a>'.format(issue.key, icons(issue.fields.issuetype), issue.fields.issuetype, issue.fields.summary, issue.fields.assignee )) | ||
f.write('</div>'); | ||
f.close() | ||
|
||
# next | ||
f = open("/tmp/jira-next.html", "w") | ||
next=str(next_year)[2:]+"."+next_month | ||
f.write('<div style="color: #ccc;"><h1 style="color: #ccc;">Planned for '+next+' and further</h1>Sorted by priority<p></div><div class="icon-menu">') | ||
for issue in jira.search_issues('project=AR and fixVersion="'+next+'" and status!="Done" and status!="Closed" order by priority desc', maxResults=100): | ||
f.write('<a class="icon-menu__link" href=https://armbian.atlassian.net/browse/{}>{} {}: {}, <i>Assigned to: {}</i></a>'.format(issue.key, icons(issue.fields.issuetype), issue.fields.issuetype, issue.fields.summary, issue.fields.assignee)) | ||
f.write('</div>'); | ||
f.close() |