Skip to content

Commit

Permalink
Merge pull request #307 from procore/jm/github-ations-etc
Browse files Browse the repository at this point in the history
chore: setup github stuff
  • Loading branch information
jmeridth committed Jul 28, 2023
2 parents fd274a3 + 1436fda commit 24200af
Show file tree
Hide file tree
Showing 14 changed files with 386 additions and 173 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
Note on DCO:
If the DCO check fails, one or more of your commits are not signed off. Please click on the *Details* link next to the DCO action for instructions on how to resolve this.
Note on Versioning:
Maintainers will bump the version and do a release when they are ready to release (possibly multiple merged PRs). Please do not bump the version in your PRs.
-->

Checklist:

* [ ] I have updated the necessary documentation
* [ ] I have updated the changelog, if necessary (CHANGELOG.md)
* [ ] I have signed off all my commits as required by [DCO](../CONTRIBUTING.md#legal)
* [ ] My build is green
11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: /
schedule:
interval: "weekly"
timezone: "America/Los_Angeles"
labels:
- "dependabot"
- "docker"
- "dependencies"
13 changes: 13 additions & 0 deletions .github/workflows/auto-assign-author.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Auto Author Assign'

on:
pull_request_target:
types: [opened, reopened]

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@0fd2847dd52b3cb103d743049dcfb7f17d39c51f # (latest, untagged)
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release
on:
workflow_run:
workflows: [Test]
types: [completed]
branches: [master, main]
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@96f53100ba2a5449eb71d2e6604bbcd94b9449b5 # (latest, untagged)
- name: Version file changed
id: version-file-changed
uses: tj-actions/changed-files@ea41e772876ff19a8d86e3315c52ceff3dae1941 # (latest, untagged)
with:
files: lib/blueprinter/version.rb
- name: Release New Gem Version
if: ${{ steps.version-file-changed.outputs.any_changed == 'true' }}
uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b # (latest, untagged)
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBY_GEMS_API_KEY}}
RELEASE_COMMAND: bundle exec rake release || true # Don't fail when deploy does not take place
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@96f53100ba2a5449eb71d2e6604bbcd94b9449b5 # (latest, untagged)
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Installing dependencies
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
- name: Run tests
run: bundle exec rake
- name: Benchmarks
run: bundle exec rake benchmarks
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Gemfile.lock
.vscode
.DS_Store
tmp/
.tool-versions
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.26.0 - 2023/00/00
* 🐛 [FEATURE] Transition to GitHub Actions from CircleCI and update to handle Ruby versions 2.7, 3.0, 3.1, 3.2

## 0.25.3 - 2021/03/03
* 🐛 [BUGFIX] Fixes issue where fields and associations that are redefined by later views were not properly overwritten. See [#201](https://github.com/procore/blueprinter/pull/201) thanks to [@Berardpi](https://github.com/Berardpi).

Expand Down
130 changes: 130 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# 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
* Spam or other deceptive practices that take advantage of the community
* 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.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
<opensource@procore.com>.
All complaints will be reviewed and investigated promptly and fairly by
the [Procore Open Source Program Office (OSPO)](docs/contact.md)

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing to Procore Projects

This document explains the common procedures expected by contributors while submitting code to Procore open source projects.

## Code of Conduct

Please read and abide by the [Code of Conduct](CODE_OF_CONDUCT.md)

## General workflow

Once a GitHub issue is accepted and assigned to you, please follow general workflow in order to submit your contribution:

1. Fork the target repository under your GitHub username.
2. Create a branch in your forked repository for the changes you are about to make.
3. Commit your changes in the branch you created in step 2. All commits need to be signed-off. Check the [legal](#legal) section bellow for more details.
4. Push your commits to your remote fork.
5. Create a Pull Request from your remote fork pointing to the HEAD branch (usually `main` branch) of the target repository.
6. Check the GitHub build and ensure that all checks are green.

## Legal

Procore projects use Developer Certificate of Origin ([DCO](https://github.com/apps/dco/)).

Please sign-off your contributions by doing ONE of the following:

* Use `git commit -s ...` with each commit to add the sign-off or
* Manually add a `Signed-off-by: Your Name <your.email@example.com>` to each commit message.

The email address must match your primary GitHub email. You do NOT need cryptographic (e.g. gpg) signing.

* Use `git commit -s --amend ...` to add a sign-off to the latest commit, if you forgot.

*Note*: Some projects will provide specific configuration to ensure all commits are signed-off. Please check the project's documentation for more details.

## Tests

Make sure your changes are properly covered by automated tests. We aim to build an efficient test suite that is low cost to maintain and bring value to project. Prefer writing unit-tests over heavy end-to-end (e2e) tests. However, sometimes e2e tests are necessary. If you aren't sure, ask one of the maintainers about the requirements for your pull-request.
10 changes: 10 additions & 0 deletions EMERITUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Emeritus Approvers

These are the people who have been approvers in the past, and have since retired from the role.

We thank them for their service to the project.

| Emeritus | GitHub ID |
| -------- | --------- |
| Adam Hess | [hparker](https://github.com/hparker) |
| Michael Clayton| [mcclayton](https://github.com/mcclayton) |
Loading

0 comments on commit 24200af

Please sign in to comment.