Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You're welcome to add a new project in *Good First Issues*, just follow these st

- To maintain the quality of projects in *Good First Issues*, please make sure your GitHub repository meets the following criteria:

- It has at least three issues with the `good first issue` label. This label is already present on all repositories by default. If not, you can follow the steps [here](https://help.github.com/en/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests).
- It has at least three issues with the `good first issue` label. This label is already present on all repositories by default.

- It contains a `README.md` with detailed setup instructions for the project

Expand Down
3 changes: 2 additions & 1 deletion src/DTO/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
public function __construct(
public string $html_url,
public string $title,
public int $number
public int $number,
public string $updated_at
) {
}
}
3 changes: 2 additions & 1 deletion src/GitHubAPIClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public function requestIssues(string $repository_name): array
$issues[] = new Issue(
$data['html_url'],
$data['title'],
$data['number']
$data['number'],
$data['updated_at']
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function renderCardListItemHTML(Issue $issue): string
$replace_pairs = [
'_ISSUE_HREF_' => $issue->html_url,
'_ISSUE_TITLE_' => $issue->title,
'_ISSUE_UPDATED_AT_' => 'TODO',
'_ISSUE_UPDATED_AT_' => Carbon::parse($issue->updated_at)->diffForHumans(),
];

return strtr($list_item_template, $replace_pairs);
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/Examples/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<a href="#" class="card-link fw-bold text-decoration-none">
Set `level: 2` in phpstan.neon.dist
</a>
<small class="text-body-secondary ms-1">upd: 17 feb 2023</small>
<small class="text-body-secondary ms-1">17 feb 2023</small>
</li>
<li class="my-3">
<a href="#" class="card-link fw-bold text-decoration-none">
Expand Down Expand Up @@ -188,7 +188,7 @@ <h1 class="h6 text-uppercase fw-bold mt-2">Good First Issue</h1>
contribution to open-source.</p>

<div class="d-grid gap-2 my-4">
<a href="#" class="btn btn-success btn-block text-uppercase fw-bold" type="button">
<a target="_blank" href="https://github.com/good-first-issues/good-first-issues.github.io?tab=readme-ov-file#adding-a-new-project" class="btn btn-success btn-block text-uppercase fw-bold" type="button">
Add your project
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 class="h6 text-uppercase fw-bold mt-2">Good First Issue</h1>
contribution to open-source.</p>

<div class="d-grid gap-2 my-4">
<a href="#" class="btn btn-success btn-block text-uppercase fw-bold" type="button">
<a target="_blank" href="https://github.com/good-first-issues/good-first-issues.github.io?tab=readme-ov-file#adding-a-new-project" class="btn btn-success btn-block text-uppercase fw-bold" type="button">
Add your project
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/main_card_li.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<a href="_ISSUE_HREF_" class="card-link fw-bold text-decoration-none">
_ISSUE_TITLE_
</a>
<small class="text-body-secondary ms-1">upd: _ISSUE_UPDATED_AT_</small>
<small class="text-body-secondary ms-1">_ISSUE_UPDATED_AT_</small>
</li>