diff --git a/app/templates/all_pr_for_org.html b/app/templates/all_pr_for_org.html index db69454..e09d2dc 100644 --- a/app/templates/all_pr_for_org.html +++ b/app/templates/all_pr_for_org.html @@ -26,8 +26,10 @@
{% for monitored_pr in open_prs %} + {% with code_pr_number=monitored_pr.code_pull_request.pr_number|stringformat:"s" documentation_pr_number=monitored_pr.documentation_pull_request.pr_number|stringformat:"s" %} {% with code_pr_name="#"|add:code_pr_number|add:" "|add:monitored_pr.code_pull_request.pr_title %} + { % 'title':"{{'jjj'}} %s"}
{% if monitored_pr.pull_request_status == "NOT_CONNECTED" %}
@@ -35,7 +37,7 @@ {{ code_pr_name }} {{monitored_pr.pull_request_status}} + data-icon="octicon:note-16">{{monitored_pr.get_pull_request_status_display}}
diff --git a/samples/all_pr_for_org-empty.json b/samples/all_pr_for_org-empty.json new file mode 100644 index 0000000..573cfdc --- /dev/null +++ b/samples/all_pr_for_org-empty.json @@ -0,0 +1,15 @@ +{ + "template": "all_pr_for_org.html", + "repo_mapping": { + "code_repo": { + "owner": { + "account_name": "Acme, Inc" + }, + "repo_full_name": "acme/mono-repo" + }, + "documentation_repo": { + "repo_full_name": "acme/documentation" + } + }, + "open_prs": [] +} diff --git a/samples/all_pr_for_org.json b/samples/all_pr_for_org.json new file mode 100644 index 0000000..3b6fb87 --- /dev/null +++ b/samples/all_pr_for_org.json @@ -0,0 +1,100 @@ +{ + "template": "all_pr_for_org.html", + "repo_mapping": { + "code_repo": { + "owner": { + "account_name": "Acme, Inc" + }, + "repo_full_name": "acme/mono-repo" + }, + "documentation_repo": { + "repo_full_name": "acme/documentation" + } + }, + "open_prs": [ + { + "pull_request_status": "NOT_CONNECTED", + "get_pull_request_status_display": "Not Connected", + "get_latest_approval": { + "approver": { + "github_user":{ + "account_name": "Amit Upadhyay" + } + }, + "created_on": "2 minutes" + }, + "code_pull_request": { + "pr_number": 20, + "pr_title" : "Code PR title here", + "get_url" : "https://github.com/fifthtry" + }, + "documentation_pull_request":{ + "pr_number": 10, + "pr_title" : "Document PR title here" + } + }, + { + "pull_request_status": "APPROVED", + "get_pull_request_status_display": "Approved", + "get_latest_approval": { + "approver": { + "github_user":{ + "account_name": "Amit Upadhyay" + } + }, + "created_on": "2 minutes" + }, + "code_pull_request": { + "pr_number": 20, + "pr_title" : "Code PR title here", + "get_url" : "https://github.com/fifthtry" + }, + "documentation_pull_request":{ + "pr_number": 10, + "pr_title" : "Document PR title here" + } + }, + { + "pull_request_status": "APPROVAL_PENDING", + "get_pull_request_status_display": "Approval Pending", + "get_latest_approval": { + "approver": { + "github_user":{ + "account_name": "Amit Upadhyay" + } + }, + "created_on": "2 minutes" + }, + "code_pull_request": { + "pr_number": 20, + "pr_title" : "Code PR title here", + "get_url" : "https://github.com/fifthtry" + }, + "documentation_pull_request":{ + "pr_number": 10, + "pr_title" : "Document PR title here" + } + }, + { + "pull_request_status": "STALE_CODE", + "get_pull_request_status_display": "Stale Code", + "get_latest_approval": { + "approver": { + "github_user":{ + "account_name": "Amit Upadhyay" + } + }, + "created_on": "2 minutes" + }, + "code_pull_request": { + "pr_number": 20, + "pr_title" : "Code PR title here", + "get_url" : "https://github.com/fifthtry" + }, + "documentation_pull_request":{ + "pr_number": 10, + "pr_title" : "Document PR title here" + } + } + ] +} diff --git a/samples/login.json b/samples/login.json new file mode 100644 index 0000000..a2d3ddc --- /dev/null +++ b/samples/login.json @@ -0,0 +1,3 @@ +{ + "template": "login.html" +} diff --git a/samples/pr_approval.json b/samples/pr_approval.json new file mode 100644 index 0000000..5b98e76 --- /dev/null +++ b/samples/pr_approval.json @@ -0,0 +1,3 @@ +{ + "template": "pr_approval.html" +} diff --git a/samples/pr_approval_base.json b/samples/pr_approval_base.json new file mode 100644 index 0000000..1917035 --- /dev/null +++ b/samples/pr_approval_base.json @@ -0,0 +1,3 @@ +{ + "template": "pr_approval_base.html" +}