Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend changes #21

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/templates/all_pr_for_org.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@
<div class="doc-history">
<!--Row-->
{% 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"}
<div class="doc-history-row">
{% if monitored_pr.pull_request_status == "NOT_CONNECTED" %}
<div class="row-left">
<div class="cell-group">
<a href="{{monitored_pr.code_pull_request.get_url}}" class="cell-item item-top main-text"><span class="iconify"
data-icon="octicon:code-16"></span>{{ code_pr_name }}</a>
<span class="cell-item main-error-text"><span class="iconify"
data-icon="octicon:note-16"></span>{{monitored_pr.pull_request_status}}</span>
data-icon="octicon:note-16"></span>{{monitored_pr.get_pull_request_status_display}}</span>
</div>
</div>
<div class="row-right">
Expand Down
15 changes: 15 additions & 0 deletions samples/all_pr_for_org-empty.json
Original file line number Diff line number Diff line change
@@ -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": []
}
100 changes: 100 additions & 0 deletions samples/all_pr_for_org.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
3 changes: 3 additions & 0 deletions samples/login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "login.html"
}
3 changes: 3 additions & 0 deletions samples/pr_approval.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "pr_approval.html"
}
3 changes: 3 additions & 0 deletions samples/pr_approval_base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "pr_approval_base.html"
}