diff --git a/.github/workflows/distribute-shared.yml b/.github/workflows/distribute-shared.yml new file mode 100644 index 0000000..d0a63d9 --- /dev/null +++ b/.github/workflows/distribute-shared.yml @@ -0,0 +1,38 @@ +name: Distribute shared files + +on: + workflow_dispatch: + inputs: + repo_name: + description: "Single repo to target (empty = all)" + required: false + +jobs: + distribute: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout .github + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Propagate shared/ to all org repos + env: + GH_TOKEN: ${{ secrets.PROPAGATION_TOKEN }} + ORG: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.inputs.repo_name }} + run: | + if [ -n "$REPO_NAME" ]; then + bash scripts/propagate-files.sh \ + --source shared/ \ + --destination . \ + --repo "$REPO_NAME" \ + --message "Sync shared files from .github" + else + bash scripts/propagate-files.sh \ + --source shared/ \ + --destination . \ + --all \ + --message "Sync shared files from .github" + fi diff --git a/scripts/propagate-files.sh b/scripts/propagate-files.sh index 4a37f37..3972ad3 100644 --- a/scripts/propagate-files.sh +++ b/scripts/propagate-files.sh @@ -93,7 +93,13 @@ for repo in "${REPOS[@]}"; do mkdir -p "$(dirname "$TARGET/$DEST")" # Copy — support both file and directory sources - if [ -d "$ROOT/$SOURCE" ]; then + if [ "$DEST" = "." ]; then + # Destination is the repo root — copy items individually to avoid rm -rf . + for item in "$ROOT/$SOURCE"/* "$ROOT/$SOURCE"/.[!.]*; do + [ -e "$item" ] || continue + cp -r "$item" "$TARGET/" + done + elif [ -d "$ROOT/$SOURCE" ]; then rm -rf "${TARGET:?}/$DEST" cp -r "$ROOT/$SOURCE" "$TARGET/$DEST" else diff --git a/shared/.github/ISSUE_TEMPLATE/config.yml b/shared/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..2300392 --- /dev/null +++ b/shared/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: 📢 Report an Issue / Submit Feedback / Request a Feature + url: https://github.com/got-feedback/feedback/issues/new/choose + about: Please submit all issues, feature requests, and bug reports in our central repository. + - name: 💬 Come chat with our boisterous and helpful community and devs + url: https://discord.gg/TzPVK8fNBm + about: Over 2000 people are chatting in Discord and you could be next diff --git a/shared/CODE_OF_CONDUCT.md b/shared/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e07a0fb --- /dev/null +++ b/shared/CODE_OF_CONDUCT.md @@ -0,0 +1,63 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. All complaints +will be reviewed and investigated promptly and fairly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. + +[homepage]: https://www.contributor-covenant.org diff --git a/shared/CONTRIBUTING.md b/shared/CONTRIBUTING.md new file mode 100644 index 0000000..586c058 --- /dev/null +++ b/shared/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing + +Thanks for wanting to contribute! This org uses a release-centric workflow. +Start here for the basics; each repo may have additional project-specific +guides. + +## Getting started + +1. Find the right repo — most issues belong in `got-feedback/feedback`. + Plugin-specific issues go in the plugin's repo. +2. Read the org's development docs at `got-feedback/.github`: + - [Branching model](https://github.com/got-feedback/.github/blob/main/docs/branching.md) + - [CI/CD pipeline](https://github.com/got-feedback/.github/blob/main/docs/pipeline.md) + - [Daily workflow and commit rules](https://github.com/got-feedback/.github/blob/main/docs/guidelines.md) +3. Check the target repo's own `CONTRIBUTING.md` for license terms, DCO + requirements, and project-specific setup. + +## Developer Certificate of Origin + +We use the [Developer Certificate of Origin](https://developercertificate.org/) +(DCO) to track contribution provenance. Every commit must be signed off: + +```bash +git commit -s -m "your commit message" +``` + +This appends a line like: + +```text +Signed-off-by: Jane Developer +``` + +If you forget to sign off, amend the most recent commit with +`git commit --amend -s` and force-push to your PR branch. + +## PR workflow + +- Never push directly to `main`. +- Create a feature branch on your fork. +- Open a PR against the target repo's `main` branch. +- Keep commits scoped and well-described; short imperative subject line, + blank line, then body explaining *why*. + +## Questions + +Open an issue or start a Discussion in the relevant repo if you're unsure +whether a contribution fits. diff --git a/shared/LICENSE.md b/shared/LICENSE.md new file mode 100644 index 0000000..8436350 --- /dev/null +++ b/shared/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 got-feedback + +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.