Skip to content

Commit

Permalink
chore: prep for move to procore-oss github organization
Browse files Browse the repository at this point in the history
- [x] setup .github folder (actions, dependabot.yaml, ISSUE_TEMPLATES, PULL_REQUEST_TEMPLATE.md, CODEOWNERS)
- [x] remove circleci, replace with github actions
- [x] setup required files (README.md, SECURITY.md, CODE_OF_CONDUCT.md, LICENSE.md, CONTRIBUTING.md)
- [x] update npm information
- [x] verify no procore specific stuff present

Signed-off-by: jmeridth <jmeridth@gmail.com>
  • Loading branch information
jmeridth committed Feb 23, 2024
1 parent d21ae4d commit b642108
Show file tree
Hide file tree
Showing 20 changed files with 520 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Read more about CODEOWNERS here - https://github.com/blog/2392-introducing-code-owners

* @procore/team-api
* @procore-oss/procore-ospo @procore-oss/procore-api
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: 🐞 Bug
description: File a bug/issue
title: "[bug] <title>"
labels: [bug, needs-triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: checkboxes
attributes:
label: Is this a regression?
description: Did this behavior work before?
options:
- label: Yes, this used to work before
required: false
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1.
2.
3.
4.
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: OSX 13.3.1
- **Browser Name and Version**: Chrome Version 112.0.5615.49 (Official Build) (arm64)
- **Ruby Version**: 3.0.0
value: |
- OS:
- Browser Name and version:
- Ruby Version:
render: markdown
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 📚 Documentation or README.md issue report
description: File a bug/issue for docs or README.md
title: "[bug] <title>"
labels: [docs, needs-triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Docs/README.md Part to update
description: A concise description of what you thing should be updated
validations:
required: true
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 🚀🆕 Feature Request
description: Suggest an idea or possible new feature for this project
title: "[Feature Request] <title>"
labels: [feature, needs-triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe the feature you'd like to see implemented
description: A clear and concise description of what you want to happen
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context or additional information about the problem here
validations:
required: false
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/question-support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: ❓ Question or Support Request
description: Questions and requests for support
title: "[Question/Support] <title>"
labels: [question, support, needs-triage]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Describe your question or ask for support
description: A concise description of what you would like support with
validations:
required: true
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Checklist:

* [ ] I have updated the necessary documentation
* [ ] I have signed off all my commits as required by [DCO](https://github.com/procore-oss/rspec_profiling/blob/main/CONTRIBUTING.md)
* [ ] My build is green

<!--
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.
TL;DR - You need to sign off your commits with `git commit -s` or `git commit --signoff` to indicate that you agree to the terms of the DCO.
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.
-->
20 changes: 20 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: /
schedule:
interval: "weekly"
timezone: "America/Los_Angeles"
labels:
- "dependabot"
- "dependencies"
- "github-actions"
- package-ecosystem: "npm" # See documentation for possible values
directory: /
schedule:
interval: "weekly"
timezone: "America/Los_Angeles"
labels:
- "dependabot"
- "dependencies"
- "npm"
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

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]
permissions:
contents: read
jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v2.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Custom CodeQL"
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: Ubuntu-latest
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release
on:
workflow_run:
workflows: [Test]
types: [completed]
branches: [main]
workflow_dispatch: # allow manual deployment through GitHub Action UI
permissions:
contents: read
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
env:
NODE_VERSION: 20
steps:
- uses: actions/checkout@v4
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
- name: Log when changed
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
- name: Set up node
if: ${{ github.event_name == 'workflow_dispatch' || steps.check.outputs.changed == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Compile source
if: ${{ github.event_name == 'workflow_dispatch' || steps.check.outputs.changed == 'true' }}
run: yarn run compile
- name: Publish package
if: ${{ github.event_name == 'workflow_dispatch' || steps.check.outputs.changed == 'true' }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag the release
if: ${{ github.event_name == 'workflow_dispatch' || steps.check.outputs.changed == 'true' }}
run: git tag -a v${{ steps.check.outputs.version }} -m "v${{ steps.check.outputs.version }}"
36 changes: 36 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Reference: https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Number of days of inactivity before an issue becomes stale
days-before-stale: 60
# Number of days of inactivity before a stale issue is closed
days-before-close: 7
# Issues with these labels will never be considered stale
exempt-issue-labels: "on-hold,pinned,security"
exempt-pr-labels: "on-hold,pinned,security"
# Comment to post when marking an issue as stale.
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Label to use when marking an issue as stale
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
27 changes: 27 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
strategy:
matrix:
node: ['18', '20', '21']
name: Ruby ${{ matrix.node }}
# https://docs.github.com/en/actions/learn-github-actions/expressions#example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up node ${{ matrix.node }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node}}
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Run tests with coverage
run: yarn test:coverage
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
node_modules
coverage
dist
types
*-debug.log
*-error.log
*DS_Store
.env
.idea
.npmrc
.nyc_output
*DS_Store
*-debug.log
*-error.log
coverage
dist
lib/version.json
node_modules
types
Loading

0 comments on commit b642108

Please sign in to comment.