Skip to content

Commit

Permalink
Merge pull request #170 from DSACMS/dev
Browse files Browse the repository at this point in the history
Merge Dev into Main
  • Loading branch information
natalialuzuriaga authored Oct 4, 2024
2 parents 4d48f83 + 8a7b096 commit 9aeeb4c
Show file tree
Hide file tree
Showing 51 changed files with 2,980 additions and 279 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
42 changes: 42 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
Thank you for sending the PR! We appreciate you spending the time to work on
these changes.
Help us understand your motivation by explaining why you decided to make this change.
Happy contributing!
- Comments should be formatted to a width no greater than 80 columns.
- Files should be exempt of trailing spaces.
- We adhere to a specific format for commit messages. Please write your commit
messages along these guidelines. Please keep the line width no greater than 80
columns (You can use `fmt -n -p -w 80` to accomplish this).
-->

## module-name: One line description of your change (less than 72 characters)

## Problem

Explain the context and why you're making that change. What is the problem
you're trying to solve? In some cases there is not a problem and this can be
thought of being the motivation for your change.

## Solution

Describe the modifications you've done.

## Result

What will change as a result of your pull request? Note that sometimes this
section is unnecessary because it is self-explanatory based on the solution.

Some important notes regarding the summary line:

* Describe what was done; not the result
* Use the active voice
* Use the present tense
* Capitalize properly
* Do not end in a period — this is a title/subject
* Prefix the subject with its scope

## Test Plan

(Write your test plan here. If you changed any code, please provide us with
clear instructions on how you verified your changes work.)
55 changes: 55 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "run-linting-checks"
on:
push:
branches:
- 'main'

jobs:
resolve-repolinter-json:
uses: DSACMS/repo-scaffolder/.github/workflows/extendJSONFile.yml@main
with:
url_to_json: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier3/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'

repolinter-checks:
name: Tier 3 Checks
needs: resolve-repolinter-json
runs-on: ubuntu-latest
env:
RAW_JSON: ${{ needs.resolve-repolinter-json.outputs.raw-json }}
steps:
- uses: actions/checkout@v4
- run: echo $RAW_JSON > repolinter.json
- uses: newrelic/repolinter-action@v1
with:
# A path to the JSON/YAML Repolinter ruleset to use, relative to the workflow
# working directory (i.e. under `$GITHUB_WORKSPACE`).
#
# This option is mutually exclusive with config_url. If this option and
# config_url are not specified, Repolinter's default ruleset will be used.
config_file: 'repolinter.json'

# Where repolinter-action should put the linting results. There are two
# options available:
# * "exit-code": repolinter-action will print the lint output to the console
# and set the exit code to result.passed. This output type is most useful for
# PR status checks.
# * "issue": repolinter-action will create a GitHub issue on the current
# repository with the repolinter output and always exit 0. See the README for
# more details on issue outputting behavior. This output type is ideal for
# non-intrusive notification.
#
# Default: "exit-code"
output_type: 'issue'

# The title to use for the issue created by repolinter-action. This title
# should indicate the purpose of the issue, as well as that it was created by
# a bot.
#
# This option will be ignored if output_type != "issue".
#
# Default: "[Repolinter] Open Source Policy Issues"
output_name: '[Repolinter] Tier 3 Repository Hygiene Issue'

# The default token is the repolinter token for the DSACMS org
# You can change it if needed.
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ If you know what tier you need, you can run the cookiecutter for an individual t
cookiecutter https://github.com/DSACMS/repo-scaffolder --directory=tierX
```

## Add Repometrics to your Project
To integrate repometrics into your new project, navigate to your project's `.github` directory and run the following cookiecutter command:
## Add code.json to your project
To add code.json into your project, navigate to your project's `.github` directory and run the following cookiecutter command. You will be asked questions about the project (see cookiecutter.json) in order to collect and store this metadata in code.json.
```
cookiecutter . --directory=repometrics
cookiecutter . --directory=codejson
```

## Existing Projects
Expand All @@ -37,15 +37,15 @@ You can update existing projects with the repo scaffolder. Using the `-s` flag
When creating projects, if you want to receive updates then add `dsacms-tierX` as a github topic to the repo. The scaffolder repo includes github workflows that will find all repos with that tag and can raise a pull request with an updated string or adding a file. See [actions.md](https://github.com/DSACMS/repo-scaffolder/blob/main/.github/actions.md) for more information.

## Editing or Adding Tiers
At a top level, each tier consisters of a folder for `hooks`, a folder containing the files to be added (`{{cookiecutter.project_slug}}`), and a `cookiecutter.json` defining the questions cookiecutter asks. These naming conventions must be
At a top level, each tier consists of a folder for `hooks`, a folder containing the files to be added (`{{cookiecutter.project_slug}}`), and a `cookiecutter.json` defining the questions cookiecutter asks. These naming conventions must be
followed as that is what cookiecutter picks up. The `hooks` folder needs to be duplicated in each tier. The folder
containing the files to be added can include slugged out variables such as `{{ cookiecutter.project_name }}` that can
be filled in by the answers to `cookiecutter.json`. For example, `{{ cookiecutter.project_name }}` will be filled in by
this question - `"project_name": "My Project",`. See the [cookiecutter docs](https://cookiecutter.readthedocs.io/en/stable/)
for more information.

## Repolinter
Tiers of level 1 thru 4 have repolinter.json file in their projects. Tier1 has detailed configuration of all the rules. All the other tiers extends their previuos tiers and has only the `rule` and the `level` configuration.
Tiers of level 1 thru 4 have repolinter.json file in their projects. Tier1 has detailed configuration of all the rules. All the other tiers extends their previous tiers and has only the `rule` and the `level` configuration.

Sample commands to run with the given repolinter.json path:

Expand Down Expand Up @@ -97,3 +97,4 @@ dedication](https://creativecommons.org/publicdomain/zero/1.0/) as indicated in
All contributions to this project will be released under the CC0 dedication. By
submitting a pull request or issue, you are agreeing to comply with this waiver
of copyright interest.

Binary file added assets/repolinter-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9aeeb4c

Please sign in to comment.