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

added check function for maximum page count of issue list #855

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

himorin
Copy link
Contributor

@himorin himorin commented Feb 17, 2020

for #619

change is to check maximum page count using HEAD before accessing API with GET
this also make enable to reduce number of access to API with GET when total number of issues is lower than 401 (might be useful for gap-analysis??).

@himorin himorin requested a review from r12a February 17, 2020 09:25
@himorin
Copy link
Contributor Author

himorin commented Feb 17, 2020

if this change is acceptable for gap-analysis also, I'd propose to have shared routine on fetching list of issues as another js file.

@aphillips
Copy link
Contributor

Is this still active? Can we merge it or close it?

@himorin
Copy link
Contributor Author

himorin commented Dec 18, 2023

@aphillips sorry for taking time to reply. I've took time to resolve errors in my local branch while git-rebase to gh-pages:HEAD, to check whether this modification would work with the latest script.

I believe this fix to extend max retrieval of issue lists from github is valid even now, and also we may need this relatively soon, since we already have 488 issues listed in the page, while current hard coded max as 500 issues (5 pages with 100 issues each).

@@ -415,7 +433,10 @@ <h2 class="notoc">Filter results</h2>
document.getElementById('total').textContent = "There are "+filteredIssues+" issues."
}
</script>
<script>window.onload = getAllData()</script>
<script>
// window.onload = getAllData()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code (it's why we have version control)

Comment on lines 117 to 118
function getAllData (maxpages_new) {
for (var p=1;p<maxpages_new+1;p++) fetchIssues(p)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a better name? Perhaps pages? Or totalPages? Why don't we just replace the value of maxpages with a call to fetchIssuesCount()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm.. since this PR was something of quick hack, so to remove old variable, I think I should rewrite this part with Promise.all.
Please wait a bit more for rewriting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for i18n-activity ready!

Name Link
🔨 Latest commit 33d9f3a
🔍 Latest deploy log https://app.netlify.com/sites/i18n-activity/deploys/65f7c8e12c3c370008064c0a
😎 Deploy Preview https://deploy-preview-855--i18n-activity.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@himorin
Copy link
Contributor Author

himorin commented Mar 18, 2024

@aphillips sorry for taking time.
made routines simplified using fetch() but not XMLHttpRequest, and removed unused lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants