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

doc: added conduct and contributing guidelines #268

Merged
merged 1 commit into from
Mar 31, 2024
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
]
}
},
"postCreateCommand": "npm install"
"postCreateCommand": "npm install --legacy-peer-deps"
}
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: [soumyamahunt] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: soumyamahunt
ko_fi: soumyamahunt
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: soumyamahunt
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
closes/fixes/resolves #[...]

## Description

A clear and concise description of what this pull request addresses. [...]
2 changes: 1 addition & 1 deletion .github/changelog/pre_commit_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {exec} = require('@actions/exec');

exports.preCommit = async (props) => {
core.startGroup(`Bundling`);
await exec('npm install');
await exec('npm install --legacy-peer-deps');
await exec('npm run package');
core.endGroup();
};
11 changes: 9 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ updates:
schedule:
interval: monthly
commit-message:
prefix: 'deps: '
prefix-development: 'chore: '
prefix: 'chore(Dependency): '
prefix-development: 'chore(DevDependency): '

- package-ecosystem: devcontainers
directory: /
schedule:
interval: monthly
commit-message:
prefix: 'chore(DevContainer): '
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
path: node_modules

- name: Setup npm pacakges
run: npm install
run: npm install --legacy-peer-deps
env:
SETUPSWIFT_SWIFTORG_METADATA: ${{ github.event_name == 'schedule' && '{"commit":"HEAD"}' }}

Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:

- name: Setup and Run unit tests
run: |
npm install
npm install --legacy-peer-deps
npm run lint
npm run test

Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:

- name: Setup and Build
run: |
npm install
npm install --legacy-peer-deps
npm run build
npm run package

Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:

- name: Setup and Build
run: |
npm install
npm install --legacy-peer-deps
npm run build
npm run package

Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
path: node_modules

- name: Setup npm pacakges
run: npm install
run: npm install --legacy-peer-deps

- name: Generate swift.org metadata
id: swiftorg-metadata
Expand Down Expand Up @@ -443,7 +443,7 @@ jobs:
path: node_modules

- name: Setup npm pacakges
run: npm install
run: npm install --legacy-peer-deps

- name: Generate changelog
id: changelog
Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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, sex characteristics, 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 soumya.mahunt@gmail.com. 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

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing Guidelines

This document contains information and guidelines about contributing to this project.
Please read it before you start participating.

_See also: [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md)_

## Submitting Pull Requests

You can contribute by fixing bugs or adding new features, you can go through out [GitHub issues](https://github.com/SwiftyLab/setup-swift/issues) to start contributing. For larger code changes, we first recommend discussing them in our [GitHub dicussions](https://github.com/SwiftyLab/setup-swift/discussions). When submitting a pull request, please do the followings:

1. Apply standard formatting with `npm run format`, and verify added code with lint rules by `npm run lint`.
1. Add relevant tests and ensure your changes don't break any existing tests (see [Automated Tests](#automated-tests) below).
1. Run `npm run build && npm run package` to generate `dist/index.js` with your changes that will be used as part to E2E tests.
1. Commit changes according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.

> [!TIP]
> `npm run all` can be executed to apply formatting, linting, generate `dist/index.js` file and run unit tests.

### Things you will need

* Linux, Mac OS (preferred), or Windows.
* Git
* [nodeJS environment](https://nodejs.org/)

### Automated Tests

GitHub action is already setup to run tests on pull requests targeting `main` branch. However, `npm run build && npm run package` needs to be used to generate `dist/index.js` with your changes and these changes needs to be committed along with other code changes.

## Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

<ol type='a'>
<li id='cert-a'>
The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
</li>
<li id='cert-b'>
The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
</li>
<li id='cert-c'>
The contribution was provided directly to me by some other person who certified <a href="#cert-a">(a)</a>, <a href="#cert-b">(b)</a> or <a href="#cert-c">(c)</a> and I have not modified it.
</li>
<li id='cert-d'>
I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
</li>
</ol>
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This action supports the following functionalities:
- Caches installed setup in tool cache.
- Allows fetching snapshot metadata without installation (can be used to setup docker images).

## Latest supported toolchains

| Release Type | Latest Available |
|--------------|------------------|
| Stable | [![Latest Release](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fswiftylab.github.io%2Fsetup-swift%2Fmetadata.json&query=%24.release.name&logo=swift&logoColor=white&label=Swift&color=orange)](https://www.swift.org/download/#releases)<br/>[![Latest Release Tag](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fswiftylab.github.io%2Fsetup-swift%2Fmetadata.json&query=%24.release.tag&logo=swift&logoColor=white&label=tag&color=orange)](https://www.swift.org/download/#releases) |
Expand Down Expand Up @@ -82,7 +84,7 @@ steps:
run: swift --version
```

**See [action.yml](action.yml) for complete list of inputs and outputs.**
**See [action.yml](action.yml) for complete list of inputs and outputs, see [wiki](https://github.com/SwiftyLab/setup-swift/wiki) for inner workings of this action.**

## Specifying version

Expand Down
Loading