Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing and code of conduct #815

Closed
wants to merge 4 commits into from
Closed
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
42 changes: 42 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Issue Report
about: Report a bug, suggest an enhancement, or ask a question
title: ""
labels: ""
assignees: ""
---

## Issue Type

Please select the type of issue you are reporting:

- [ ] Bug Report
- [ ] Feature Request
- [ ] Discussion
- [ ] Question

## Description

Please provide a clear and concise description of the issue or enhancement. Include any relevant information that could help reproduce the issue or understand the request.

## Steps to Reproduce (for bugs)

1. Step one
2. Step two
3. ...

## Expected Behavior

Describe what you expected to happen.

## Actual Behavior

Describe what actually happened.

## Additional Context

Add any other context about the issue here, including screenshots, logs, or other supporting information.

---

Thank you for taking the time to report this issue!
19 changes: 14 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<!-- deno-fmt-ignore-file -->
## What is this contribution about?
## What is this Contribution About?

## Loom
> Record a quick screencast describing your changes to show the team and help reviewers.
Please provide a brief description of the changes or enhancements you are proposing in this pull request.

## Link
> Please provide a link to a branch that demonstrates this pull request in action.
## Issue Link

Please link to the relevant issue that this pull request addresses:

- Issue: [#ISSUE_NUMBER](link_to_issue)

## Loom Video

> Record a quick screencast describing your changes to help the team understand and review your contribution. This will greatly assist in the review process.

## Demonstration Link

> Provide a link to a branch or environment where this pull request can be tested and seen in action.
87 changes: 87 additions & 0 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Release Tagging

on:
pull_request:
types: [opened, reopened, synchronize, closed]

jobs:
tag-discussion:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Start Discussion for Tagging
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Tagging Options
Should a new tag be published when this PR is merged?
- 👍 for **Patch** update
- 🎉 for **Minor** update
- 🚀 for **Major** update

determine-tag:
if: github.event.action == 'closed' && github.event.pull_request.merged == true
needs: tag-discussion
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Get the latest tag
id: get_tag
run: echo "::set-output name=latest_tag::$(git describe --tags --abbrev=0)"

- name: Determine the next version based on comments
id: determine_version
run: |
LATEST_TAG=${{ steps.get_tag.outputs.latest_tag }}
MAJOR=$(echo $LATEST_TAG | cut -d. -f1)
MINOR=$(echo $LATEST_TAG | cut -d. -f2)
PATCH=$(echo $LATEST_TAG | cut -d. -f3)

REACTION=$(gh api graphql -f query='
query {
repository(owner:"${{ github.repository_owner }}", name:"${{ github.event.repository.name }}") {
pullRequest(number: ${{ github.event.pull_request.number }}) {
comments(last: 100) {
nodes {
body
reactions(last: 100) {
nodes {
content
user {
login
}
}
}
}
}
}
}
}' | jq -r '.data.repository.pullRequest.comments.nodes[].reactions.nodes[].content')

if [[ "$REACTION" == *"ROCKET"* ]]; then
NEW_TAG="$((MAJOR + 1)).0.0"
elif [[ "$REACTION" == *"TADA"* ]]; then
NEW_TAG="$MAJOR.$((MINOR + 1)).0"
else
NEW_TAG="$MAJOR.$MINOR.$((PATCH + 1))"
fi

echo "::set-output name=new_version::$NEW_TAG"

- name: Update Version File
run: |
echo ${{ steps.determine_version.outputs.new_version }} > version.txt
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add version.txt
git commit -m "Update version to ${{ steps.determine_version.outputs.new_version }}"
git push origin ${{ github.head_ref }}

- name: Create and Push Tag
run: |
git tag ${{ steps.determine_version.outputs.new_version }}
git push origin ${{ steps.determine_version.outputs.new_version }}
20 changes: 0 additions & 20 deletions .github/workflows/update.yml

This file was deleted.

73 changes: 73 additions & 0 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at {{ email }}. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contributing Guidelines

Thank you for your interest in contributing to the `deco-cx/apps` repository! We are excited to have community members like you involved in improving our collection of powerful apps. This document outlines how you can contribute effectively to the project.

## How to Contribute

### Issues

When submitting an issue, please use one of the following types:

- **Issue/Bug**: Report bugs or track existing issues.
- **Issue/Discussion**: Start a discussion to gather input on a topic before it becomes a proposal.
- **Issue/Proposal**: Propose a new idea or functionality. This allows for feedback before any code is written.
- **Issue/Question**: Ask for help or clarification on any topic related to the project.

### Before You File an Issue

Before submitting an issue, ensure the following:

1. **Correct Repository**: Verify that you are filing the issue in the correct repository within the deco ecosystem.
2. **Existing Issues**: Search through [open issues](./issues) to check if the issue has already been reported or the feature has already been requested.
3. **For Bugs**:
- Confirm that it’s not an environment-specific issue. Ensure all prerequisites (e.g., dependencies, configurations) are met.
- Provide detailed logs, stack traces, or any other relevant data to help diagnose the issue.
4. **For Proposals**:
- Discuss potential features in the appropriate issue to gather feedback before coding.

### Pull Requests

We welcome contributions via pull requests (PRs). Follow this workflow to submit your changes:

1. **Issue Reference**: Ensure there is an issue raised that corresponds to your PR.
2. **Fork and Branch**: Fork the repository and create a new branch for your changes.
3. **Code Changes**:
- Include appropriate tests with your code changes.
- Run linters and format the code according to project standards:
- Run `deno task check`
4. **Documentation**: Update any relevant documentation with your changes.
5. **Commit and PR**: Commit your changes and submit a PR for review.
6. **CI Checks**: Ensure that all Continuous Integration (CI) checks pass successfully.
7. **Review Process**: A maintainer will review your PR, usually within a few days.

#### Work-in-Progress (WIP) PRs

If you’d like early feedback on your work, you can create a PR with the prefix `[WIP]` to indicate that it is still under development and not ready for merging.

### Testing Your Contributions

Since this repository contains integrations that must be tested against a deco site, you cannot test your contributions in isolation. Please refer to this [Helpful content](https://www.notion.so/decocx/Helpful-Community-Content-101eec7ce64f4becaebb685dd9571e24) for instructions on how to set up a deco site for testing purposes.

### Use of Third-Party Code

- Ensure that any third-party code included in your contributions comes with the appropriate licenses.

### Releasing a New Version

We follow semantic versioning, and all apps in this repository are versioned collectively using git tags. To release a new version:

1. Fork the repository and create a pull request with your changes.
2. After the PR is approved and merged, request a maintainer to run the release task:

```sh
deno task release
```
Loading
Loading