Update lob

This commit is contained in:
Marcus Kammer 2021-06-17 08:33:26 +02:00
parent c4c61183c7
commit 7c07f5d821

View file

@ -679,3 +679,28 @@ this default behavior. Below is a list of such options:
print(*org_list(unique(authors(commits(repo)))))
#+end_src
** Show gitlab issues
#+name: gitlab-issues
#+begin_src python
import requests
import feedparser
def show_issues(URL):
issues = []
states = ['&label_name[]=Doing',
'&label_name[]=Ready',
'&label_name[]=In Progress']
for state in states:
full_url = URL + state
response = requests.get(full_url)
feed = feedparser.parse(response.text)
for entry in feed.entries:
_id = entry['id'].split('/')[-1]
_url = entry['id']
_title = entry['title']
issues.append(f"[[{_url}][{_title} ({_id})]]")
for issue in issues:
print(issue)
#+end_src