diff --git a/library-of-babel.org b/library-of-babel.org index f6c758de..a73bbf17 100644 --- a/library-of-babel.org +++ b/library-of-babel.org @@ -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