Skip to content
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
68 changes: 68 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## Pledge

We pledge to make our community welcoming, safe, and equitable for all.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.

### Encouraged Behaviors

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:

- Respecting the purpose of our community, our activities, and our ways of gathering.
- Engaging kindly and honestly with others.
- Respecting different viewpoints and experiences.
- Taking responsibility for our actions and contributions.
- Gracefully giving and accepting constructive feedback.
- Committing to repairing harm when it occurs.
- Behaving in other ways that promote and sustain the well-being of our community.

## Restricted Behaviors

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.

- Harassment. Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
- Character attacks. Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
- Stereotyping or discrimination. Characterizing anyone's personality or behavior on the basis of immutable identities or traits.
- Sexualization. Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
- Violating confidentiality. Sharing or acting on someone's personal or private information without their permission.
- Endangerment. Causing, encouraging, or threatening violence or other harm toward any person or group.
- Behaving in other ways that threaten the well-being of our community.

### Other Restrictions

- Misleading identity. Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
- Failing to credit sources. Not properly crediting the sources of content you contribute.
- Irresponsible communication. Failing to responsibly present content which includes, links or describes any other restricted behaviors.

## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, contact the project maintainers directly through GitHub issues or discussions.

Community Moderators take reports of violations seriously and will investigate all reports of code of conduct violations. In order to honor the values of safety and confidentiality, enforcement actions are carried out as transparently as possible while prioritizing the safety and privacy of those involved.

### Addressing and Repairing Harm

If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.

- **Warning**
- Event: A violation involving a single incident or series of incidents.
- Consequence: A private, written warning from the Community Moderators.
- Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
- **Temporary Suspension**
- Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
- Consequence: A private written warning with conditions for return from suspension.
- Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
- **Permanent Ban**
- Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
- Consequence: Access to all community spaces, tools, and communication channels is removed.
- Repair: There is no possible repair in cases of this severity.

This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug Report
about: Report a bug or unexpected behavior
labels: bug
---

## Description

<!-- A clear description of what the bug is -->

## Steps to Reproduce

1.
2.
3.

## Expected Behavior

<!-- What did you expect to happen? -->

## Actual Behavior

<!-- What actually happened? -->

## Environment

- OS:
- Runtime/Node version:
- Browser (if applicable):

## Additional Context

<!-- Any other context, logs, or screenshots -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security Vulnerability
url: https://github.com/entrius/das-github-mirror/security/advisories/new
about: Report security vulnerabilities privately via GitHub Security Advisories
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Request
about: Suggest a new feature or improvement
labels: enhancement
---

## Summary

<!-- Brief description of the feature -->

## Motivation

<!-- Why is this feature needed? What problem does it solve? -->

## Proposed Solution

<!-- Optional: Describe your ideal solution or implementation -->
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Summary

<!-- Brief description of the changes -->

## Related Issues

<!-- Link to related issues: Fixes #123, Closes #456 -->

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor
- [ ] Documentation
- [ ] Other (describe below)

## Testing

<!-- Describe how you tested these changes -->

## Checklist

- [ ] I have read the [Contributing Guide](./CONTRIBUTING.md)
- [ ] Code builds without errors
- [ ] New and existing tests pass (if applicable)
- [ ] Documentation updated (if applicable)
- [ ] No unnecessary dependencies added
18 changes: 18 additions & 0 deletions .github/workflows/pr-source-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: pr-source-check

on:
pull_request:
branches: [main]

jobs:
pr-source-check:
runs-on: ubuntu-latest
steps:
- name: Enforce source = test for PRs into main
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "test" ]; then
echo "::error::PRs into main must originate from 'test'. Head is '${{ github.event.pull_request.head.ref }}'."
echo "::error::Open your PR against 'test' instead. main only advances via the Release workflow."
exit 1
fi
echo "PR source is 'test' — allowed."
109 changes: 109 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# das-github-mirror Contributor Guide

## Getting Started

Before contributing, please:

1. Read the [README](./README.md) to understand the project
2. Familiarize yourself with the project structure and tech stack
3. Check existing issues and PRs to avoid duplicate work

## Local Development

1. Ensure you have the required runtime installed (check README for version requirements)
2. Clone the repo and install dependencies
3. Copy `.env.example` to `.env` and configure as needed
4. Follow the README to start the development server

## Creating Issues

When opening an issue, use the appropriate template:

- **[Bug Report](.github/ISSUE_TEMPLATE/bug_report.md)** - Report bugs or unexpected behavior. Include steps to reproduce, expected vs actual behavior, and environment details.
- **[Feature Request](.github/ISSUE_TEMPLATE/feature_request.md)** - Suggest new features or improvements. Explain the motivation and proposed solution.
- **Blank Issue** - For issues that don't fit the above templates.

For security vulnerabilities, **do not create a public issue**. Report them privately via [GitHub Security Advisories](https://github.com/entrius/das-github-mirror/security/advisories/new).

## Pull Request Process

### 1. Create Your Branch

- Branch off of `test` and target it with your PR. PRs that target the wrong base branch will be closed without review.
- Ensure there are no conflicts before submitting

### 2. Make Your Changes

- Write clean, well-documented code
- Follow existing code patterns and architecture
- Update documentation if applicable
- Ensure everything builds and runs correctly before submitting

### 3. Submit Pull Request

1. Push your branch to the repository
2. Open a PR targeting `test`
3. Fill out the [PR template](.github/PULL_REQUEST_TEMPLATE.md):
- **Summary**: Clear description of changes
- **Related Issues**: Link issues using `Fixes #123` or `Closes #456`
- **Type of Change**: Select bug fix, new feature, refactor, documentation, or other
- **Testing**: Confirm manual testing performed
- **Checklist**: Verify your changes meet the repo's standards

### 4. Code Review

- Reviewers will be assigned automatically
- Address review comments promptly

### Issue Scope

PRs should focus on the linked issue. Minor incidental changes are fine. PRs dominated by unrelated changes (>50% of the diff) will be asked to scope down.

### PR Iteration Expectations

The repository runs an automated maintainer agent that may close PRs in the following cases:

- Failing CI for 12+ hours with no fix pushed
- Unresolved merge conflicts for 12+ hours with no resolution push
- Requested changes from a maintainer for 12+ hours with no follow-up commits

## PR Labels

Apply appropriate labels to help categorize and track your contribution:

- `bug` - Bug fixes
- `feature` - New feature additions
- `enhancement` - Improvements to existing features
- `refactor` - Code refactoring without functionality changes
- `documentation` - Documentation updates

## Code Standards

### Quality Expectations

- Follow repository conventions (commenting style, variable naming, etc.)
- Use sensible component decomposition to keep files manageable
- Write clean, readable, maintainable code
- Avoid modifying unrelated files
- Avoid adding unnecessary dependencies
- Ensure all build checks pass before submitting

## Branches

### `test`

**Purpose**: Main development and production-ready code

**Restrictions**:

- Requires pull request
- Requires all checks to pass
- Requires at least one approval

## License

By contributing to das-github-mirror, you agree that your contributions will be licensed under the project's MIT license.

---

Thank you for contributing to das-github-mirror!
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 entrius

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Security Policy

## Reporting a Vulnerability

If you discover a security vulnerability in das-github-mirror or any of its components, we strongly encourage you to report it responsibly.

Please **do not publicly disclose** the vulnerability until we have had a reasonable chance to address it.

### Confidential Reporting

To report a vulnerability, you can use any of the following methods:

- Use [GitHub Security Advisories](https://github.com/entrius/das-github-mirror/security/advisories/new) to report privately.

### What to Include

When reporting a vulnerability, please provide as much detail as possible:

- Affected component/files
- Version or commit hash
- Description of the vulnerability
- Steps to reproduce (if possible)
- Impact assessment
- Any potential mitigations or recommendations

---

## Response Process

1. We will acknowledge your report within **48 hours**.
2. We will investigate and confirm the issue.
3. If confirmed, we will coordinate on a fix and set an embargo period if needed.
4. A fix will be developed, tested, and released as soon as possible.
5. You will be credited (if you wish) in the security section of our release notes.

---

## Thank You

We appreciate your efforts in keeping das-github-mirror secure and responsible.
14 changes: 9 additions & 5 deletions packages/das/src/api/miners/miners.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,25 @@ export class MinersController {
@ApiOperation({
summary: "Issues authored by a miner",
description:
"Returns every issue the miner has authored since the given date, " +
"including current labels with actor attribution and the PR number " +
"(if any) that solved the issue.",
"Returns issues the miner has authored, with current labels (actor " +
"attribution) and any solving PR. When `since` is provided, returns " +
"OPEN issues created on/after that date plus CLOSED issues closed " +
"on/after that date (scoring window). When `since` is omitted, " +
"returns all currently-OPEN issues with no time bound and no CLOSED " +
"history (open-issue load counting).",
})
@ApiParam({ name: "githubId", description: "GitHub user ID (numeric)" })
@ApiQuery({
name: "since",
required: false,
description:
"ISO timestamp. Defaults to 35 days ago (midnight UTC) if omitted.",
"ISO timestamp. When omitted, the response contains all currently-" +
"OPEN issues with no time bound and no CLOSED history.",
})
async getIssues(
@Param("githubId") githubId: string,
@Query("since") since?: string,
): Promise<unknown> {
return this.miners.getIssues(githubId, MinersService.resolveSince(since));
return this.miners.getIssues(githubId, since ?? null);
}
}
Loading
Loading