Skip to content

Commit 1e3e783

Browse files
authored
Merge branch 'main' into AboutUI
2 parents cb12d3f + 61dc8a2 commit 1e3e783

17 files changed

Lines changed: 893 additions & 560 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Auto Assign Issue Author
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
auto-assign:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write # Required for assigning issues
12+
13+
steps:
14+
- name: Assign issue to creator
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const issueCreator = context.payload.issue.user.login;
19+
const issueNumber = context.payload.issue.number;
20+
21+
await github.rest.issues.addAssignees({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: issueNumber,
25+
assignees: [issueCreator],
26+
});
27+
28+
console.log(`Assigned issue #${issueNumber} to @${issueCreator}`);

.github/workflows/greetings.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Greetings
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
pr-message: " 🎉 Thank you @${{ github.actor }} for your contribution. Please make sure your PR follows https://github.com/GitMetricsLab/github_tracker/blob/main/CONTRIBUTING.md#-pull-request-guidelines"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Post-PR Merge Thank You
2+
3+
on:
4+
pull_request_target:
5+
types: [closed] # Trigger when a PR is closed
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
post_merge_message:
13+
if: github.event.pull_request.merged == true # Only run if the PR was merged
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Post thank you message
18+
uses: actions/github-script@v7
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }} # Ensure token is used
21+
script: |
22+
const prNumber = context.payload.pull_request.number;
23+
const owner = context.repo.owner;
24+
const repo = context.repo.repo;
25+
26+
// Post a thank you message upon PR merge
27+
await github.rest.issues.createComment({
28+
owner: owner,
29+
repo: repo,
30+
issue_number: prNumber,
31+
body: `🎉🎉 Thank you for your contribution! Your PR #${prNumber} has been merged! 🎉🎉`
32+
});
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Unassign Issues with No PR After 7 Days
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Runs daily at 2 AM UTC
6+
workflow_dispatch: # Manual trigger support
7+
8+
jobs:
9+
unassign-stale-issues:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check for stale assigned issues
13+
uses: actions/github-script@v7
14+
with:
15+
github-token: ${{ secrets.PAT }}
16+
script: |
17+
const daysBeforeUnassign = 7;
18+
const cutoffDate = new Date();
19+
cutoffDate.setDate(cutoffDate.getDate() - daysBeforeUnassign);
20+
21+
const issues = await github.paginate(github.rest.issues.listForRepo, {
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
state: 'open',
25+
assignee: '*'
26+
});
27+
28+
for (const issue of issues) {
29+
if (issue.pull_request) continue; // Skip PRs
30+
31+
const createdAt = new Date(issue.created_at);
32+
const assigned = issue.assignees.length > 0;
33+
34+
if (assigned && createdAt < cutoffDate) {
35+
// Check if there's a linked PR via timeline
36+
const timeline = await github.paginate(github.rest.issues.listEventsForTimeline, {
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
issue_number: issue.number,
40+
mediaType: {
41+
previews: ["mockingbird"]
42+
}
43+
});
44+
45+
const hasLinkedPR = timeline.some(event => event.event === 'connected');
46+
47+
if (!hasLinkedPR) {
48+
console.log(`Unassigning issue #${issue.number} (no PR in 7 days)`);
49+
await github.rest.issues.removeAssignees({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
issue_number: issue.number,
53+
assignees: issue.assignees.map(user => user.login)
54+
});
55+
56+
await github.rest.issues.createComment({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
issue_number: issue.number,
60+
body: `⏰ This issue was automatically unassigned because no pull request was raised within 5 days. Feel free to ask for re-assignment if you're still working on it.`
61+
});
62+
}
63+
}
64+
}

README.md

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# 🌟 **GitHub Tracker** 🌟
2+
<!-- top -->
23

34
**Track Activity of Users on GitHub**
45

56
Welcome to **GitHub Tracker**, a web app designed to help you monitor and analyze the activity of GitHub users. Whether you’re a developer, a project manager, or just curious, this tool simplifies tracking contributions and activity across repositories! 🚀👩‍💻
67

78
<p align="center">
8-
<img src="public/crl.png" alt="github-tracker">
9+
<img src="public/crl.png" height="60px" alt="github-tracker">
910
</p>
1011
<table align="center">
1112
<thead align="center">
@@ -30,23 +31,8 @@ Welcome to **GitHub Tracker**, a web app designed to help you monitor and analyz
3031

3132
---
3233

33-
## 📊 What is GitHub Tracker?
34-
GitHub Tracker is a platform for tracking user activity on GitHub, allowing you to see contributions, repository interactions, and much more. Stay informed about your favorite projects and contributors with ease!
35-
36-
---
37-
38-
## 🔑 Key Features
39-
40-
1. **📅 User Activity Feed**: View a comprehensive feed of user activities across repositories.
41-
2. **📈 Contribution Graph**: Analyze contribution trends over time.
42-
3. **🔍 Repository Insights**: Explore detailed statistics for any GitHub repository.
43-
44-
---
45-
4634
## 🛠️ Tech Stack
4735

48-
GitHub Tracker is built using a modern tech stack for optimal performance and user experience:
49-
5036
- **Frontend**: React.js + Vite
5137
- **Styling**: TailwindCSS + Material UI
5238
- **Data Fetching**: Axios + React Query
@@ -55,11 +41,6 @@ GitHub Tracker is built using a modern tech stack for optimal performance and us
5541
---
5642

5743
## 🚀 Setup Guide
58-
59-
To set up and run **GitHub Tracker** locally, follow these steps:
60-
61-
### 🗂️ Setting Up GitHub Tracker Repository
62-
6344
1. Clone the repository to your local machine:
6445
```bash
6546
$ git clone https://github.com/yourusername/github-tracker.git
@@ -82,27 +63,6 @@ $ npm i
8263
$ npm start
8364
```
8465

85-
---
86-
87-
### 🌟 Coming Soon
88-
- Add options to track stars, followers, following
89-
- Add options to track engagements (e.g. comments, closing, opening and merging PRs)
90-
- **👥 Team Monitoring**: Track activities of your team members in one place.
91-
- **📊 Custom Dashboards**: Create personalized dashboards to visualize the data that matters to you.
92-
93-
---
94-
95-
# 👀 Our Contributors
96-
97-
- We extend our heartfelt gratitude for your invaluable contribution to our project.
98-
- Make sure you show some love by giving ⭐ to our repository.
99-
100-
<div align="center">
101-
<a href="https://github.com/mehul-m-prajapati/github_tracker">
102-
<img src="https://contrib.rocks/image?repo=mehul-m-prajapati/github_tracker&&max=1000" />
103-
</a>
104-
</div>
105-
10666
## 🧪 Backend Unit & Integration Testing with Jasmine
10767

10868
This project uses the Jasmine framework for backend unit and integration tests. The tests cover:
@@ -156,4 +116,23 @@ spec_files: [
156116

157117
---
158118

159-
For any questions or to add more tests (including frontend), see the contribution guidelines or open an issue.
119+
# 👀 Our Contributors
120+
121+
- We extend our heartfelt gratitude for your invaluable contribution to our project.
122+
- Make sure you show some love by giving ⭐ to our repository.
123+
124+
<div align="center">
125+
<a href="https://github.com/mehul-m-prajapati/github_tracker">
126+
<img src="https://contrib.rocks/image?repo=GitMetricsLab/github_tracker&&max=1000" />
127+
</a>
128+
</div>
129+
130+
131+
132+
---
133+
134+
<p align="center">
135+
<a href="#top" style="font-size: 18px; padding: 8px 16px; display: inline-block; border: 1px solid #ccc; border-radius: 6px; text-decoration: none;">
136+
⬆️ Back to Top
137+
</a>
138+
</p>

src/App.tsx

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import Navbar from "./components/Navbar";
22
import Footer from "./components/Footer";
3-
import ScrollProgressBar from './components/ScrollProgressBar';
3+
import ScrollProgressBar from "./components/ScrollProgressBar";
44
import { Toaster } from "react-hot-toast";
5-
65
import Router from "./Routes/Router";
6+
import ThemeWrapper from "./ThemeContext"; // ✅ import your wrapper
77

88
function App() {
99
return (
10-
10+
<ThemeWrapper>
1111
<div className="relative flex flex-col min-h-screen">
12-
<ScrollProgressBar/>
12+
<ScrollProgressBar />
1313

1414
{/* Navbar */}
1515
<Navbar />
1616

1717
{/* Main content */}
18-
<main className="flex-grow bg-gray-50 flex justify-center items-center">
19-
<Router/>
18+
<main className="flex-grow bg-gray-50 dark:bg-gray-900 flex justify-center items-center">
19+
<Router />
2020
</main>
2121

2222
{/* Footer */}
@@ -27,24 +27,21 @@ function App() {
2727
reverseOrder={false}
2828
gutter={8}
2929
containerClassName="mt-12"
30-
containerStyle={{}}
3130
toastOptions={{
32-
className: 'bg-white',
31+
className: "bg-white dark:bg-gray-800 text-black dark:text-white",
3332
duration: 5000,
34-
//removeDelay: 1000,
35-
3633
success: {
3734
duration: 3000,
3835
iconTheme: {
39-
primary: 'green',
40-
secondary: 'white',
36+
primary: "green",
37+
secondary: "white",
4138
},
4239
},
4340
}}
4441
/>
4542
</div>
46-
43+
</ThemeWrapper>
4744
);
4845
}
4946

50-
export default App;
47+
export default App;

0 commit comments

Comments
 (0)