Skip to content

Commit

Permalink
Added functionality to display recently merged pull requests on the C…
Browse files Browse the repository at this point in the history
…ore Development page.
  • Loading branch information
sanity committed Jun 25, 2024
1 parent b604b39 commit c32d4da
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions content/dev/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,36 @@ Welcome to the Core Development page for Freenet. This section is dedicated to t
## Developer Meetings

{{< latest-news tag="dev-meeting" >}}

## Recently Merged Pull Requests

<div id="merged-pull-requests">
<p>Loading...</p>
</div>

<script>
async function fetchMergedPullRequests() {
const response = await fetch('https://api.github.com/repos/freenet/freenet-core/pulls?state=closed&per_page=5');
const pullRequests = await response.json();
const mergedPullRequests = pullRequests.filter(pr => pr.merged_at);

const container = document.getElementById('merged-pull-requests');
container.innerHTML = '';

if (mergedPullRequests.length === 0) {
container.innerHTML = '<p>No recently merged pull requests found.</p>';
return;
}

const list = document.createElement('ul');
mergedPullRequests.forEach(pr => {
const listItem = document.createElement('li');
listItem.innerHTML = `<a href="${pr.html_url}" target="_blank">${pr.title}</a> by ${pr.user.login}`;
list.appendChild(listItem);
});

container.appendChild(list);
}

fetchMergedPullRequests();
</script>

0 comments on commit c32d4da

Please sign in to comment.