myCRM/bruno/Git Integration/Get Contributions.bru
olli 1e02439e8a feat: Implement project ownership and team member management with access control
- Added owner and team members relationships to the Project entity.
- Updated ProjectRepository to find projects based on user ownership or team membership.
- Enhanced ProjectVoter to manage view, edit, and delete permissions based on ownership and team membership.
- Created ProjectAccessExtension to filter projects based on user access.
- Updated ProjectManagement.vue to include owner and team member selection in the UI.
- Implemented API endpoints for managing Git repositories with proper access control.
- Added migration to update the database schema for project ownership and team members.
2025-11-14 10:49:54 +01:00

63 lines
1.1 KiB
Plaintext

meta {
name: Get Contributions
type: http
seq: 5
}
get {
url: {{baseUrl}}/api/git-repos/1/contributions?branch=main&year=2025
body: none
auth: none
}
params:query {
branch: main
year: 2025
~author: john@example.com
}
headers {
Accept: application/json
Cookie: {{sessionCookie}}
}
docs {
# Get Contributions
Fetches daily contribution data for a specific repository, branch, and year.
Used for generating GitHub-style contribution heatmaps.
## Query Parameters
- `branch`: Git branch name (default: 'main')
- `year`: Year for contributions (default: current year)
- `author`: Optional email filter for specific author
## Response
```json
{
"contributions": [
{
"date": "2025-01-01",
"count": 3,
"weekday": 3
},
{
"date": "2025-01-02",
"count": 0,
"weekday": 4
}
]
}
```
## Weekday Format
- 0 = Sunday
- 1 = Monday
- ...
- 6 = Saturday
## Caching
- Cached for 1 hour (3600 seconds)
- Cache key includes repository ID, branch, author, and year
}