Skip to content

Commit

Permalink
Merge pull request #3048 from metacpan/oalders/precious
Browse files Browse the repository at this point in the history
oalders/precious
  • Loading branch information
oalders authored May 15, 2024
2 parents 4b4afe7 + f81d1f4 commit bdd23aa
Show file tree
Hide file tree
Showing 28 changed files with 446 additions and 347 deletions.
101 changes: 60 additions & 41 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,54 @@ We are always after more contributors and suggestions.

#### Does it relate to our API (backend)... ?

1. Please check the [previously reported API issues](https://github.com/CPAN-API/cpan-api/issues)
2. Please check the [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't find it already there:
* If it's a wishlist idea, please edit the [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a 'wishlist_MYIDEA' page if you need more space!)
* If it's an actual bug [create a new issue](https://github.com/CPAN-API/cpan-api/issues/new)
1. Please check the
[previously reported API issues](https://github.com/CPAN-API/cpan-api/issues)
2. Please check the
[Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't
find it already there:
- If it's a wishlist idea, please edit the
[wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a
'wishlist_MYIDEA' page if you need more space!)
- If it's an actual bug
[create a new issue](https://github.com/CPAN-API/cpan-api/issues/new)

#### If you are not sure, or it is related to https://metacpan.org/ front end:

1. Please check the [previously reported Web issues](https://github.com/CPAN-API/metacpan-web/issues)
2. Please check the [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't find it already there:
* If it's a wishlist idea, please edit the [wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a 'wishlist_MYIDEA' page if you need more space!)
* If it's an actual bug [create a new issue](https://github.com/CPAN-API/metacpan-web/issues/new)
1. Please check the
[previously reported Web issues](https://github.com/CPAN-API/metacpan-web/issues)
2. Please check the
[Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist). If you can't
find it already there:
- If it's a wishlist idea, please edit the
[wiki](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) (add a
'wishlist_MYIDEA' page if you need more space!)
- If it's an actual bug
[create a new issue](https://github.com/CPAN-API/metacpan-web/issues/new)

## Contributing code

Come talk to us on IRC (see below), or send a pull request and we'll respond
there. If you implement a new feature, please add a note about it to the
News.md file at the top level of metacpan-web so that it will appear in our
news feed.
there. If you implement a new feature, please add a note about it to the News.md
file at the top level of metacpan-web so that it will appear in our news feed.

If you aren't using the VM, remember to enable the pre-commit hook before you start working.
If you aren't using the VM, remember to enable the pre-commit hook before you
start working.

sh git/setup.sh

These links will get you going quickly:

* [Using our developer VM](https://github.com/CPAN-API/metacpan-developer) to get you going in minutes (depending on bandwidth)
* [Front end bug list](https://github.com/CPAN-API/metacpan-web/issues)
* [API (back end) bug list](https://github.com/CPAN-API/cpan-api/issues)
* [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) - things that probably need doing
- [Using our developer VM](https://github.com/CPAN-API/metacpan-developer) to
get you going in minutes (depending on bandwidth)
- [Front end bug list](https://github.com/CPAN-API/metacpan-web/issues)
- [API (back end) bug list](https://github.com/CPAN-API/cpan-api/issues)
- [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) - things that
probably need doing

# Git workflow

We try to keep a clean git history, so if it all possible, please rebase to get
the latest changes from master _before_ submitting a pull request. You'll only
the latest changes from master _before_ submitting a pull request. You'll only
need to do the first command (git remote add) once in your local checkout.

git remote add upstream https://github.com/CPAN-API/metacpan-web.git
Expand All @@ -50,17 +64,18 @@ which are no longer relevant to your branch before submitting your work.

git rebase -i master

If you are not comfortable with rebasing, but want to use it, check out the steps
from [here](https://help.github.com/articles/using-git-rebase/).
If you are not comfortable with rebasing, but want to use it, check out the
steps from [here](https://help.github.com/articles/using-git-rebase/).

# Coding conventions

Please try to follow the conventions already been used in the code base. This
will generally be the right thing to do. Our standards are improving, so even
if you do follow what you see, we may ask you to make some changes, but that is
a good thing. We are trying to keep things tidy.
Please try to follow the conventions already been used in the code base. This
will generally be the right thing to do. Our standards are improving, so even if
you do follow what you see, we may ask you to make some changes, but that is a
good thing. We are trying to keep things tidy.

If you are using the [developer VM](https://github.com/CPAN-API/metacpan-developer) you can run:
If you are using the
[developer VM](https://github.com/CPAN-API/metacpan-developer) you can run:

```sh
/home/vagrant/carton/metacpan-web/bin/tidyall
Expand All @@ -69,71 +84,75 @@ If you are using the [developer VM](https://github.com/CPAN-API/metacpan-develop
## Perl Best Practices

In general, the concepts discussed in "Perl Best Practices" are a good starting
point. Use autodie where possible and MetaCPAN::Web::Types when creating new
Moose attributes. Many of the other standards will be enforced by Perl::Critic.
point. Use autodie where possible and MetaCPAN::Web::Types when creating new
Moose attributes. Many of the other standards will be enforced by Perl::Critic.

## Clear > Concise

Take pains to use variable names which are easy to understand and to write
readable code. We value readable code over concise code. Use singular nouns
for class names. Use verbs for method names.
readable code. We value readable code over concise code. Use singular nouns for
class names. Use verbs for method names.

## Try::Tiny > eval { ... }

You will see many eval statements in the code. We would like to standardize on
You will see many eval statements in the code. We would like to standardize on
Try::Tiny, so feel free to swap out any eval with a Try::Tiny and use Try::Tiny
in all new code.

## Prefer single quotes

Always use single quotes in cases where there is no variable interpolation. If
Always use single quotes in cases where there is no variable interpolation. If
there is a single quote in the quoted item, use curly quotes.

q{Isn't this a lovely day};

## Include a test (or more!)

Any time when a pull request includes a test, it makes it easier for us to
review and accept, so please do test your changes whenever possible. If your
review and accept, so please do test your changes whenever possible. If your
pull request includes visual changes, please include a before and after screen
shot, so that we can better understand the problem you're trying to solve.

## Dependencies

Introducing new dependencies is fine, if they solve a specific problem which
current dependencies cannot address. If we prefer a different module to be used,
current dependencies cannot address. If we prefer a different module to be used,
we'll let you know.

## It's OK to be controversial

If a pull request contains any controversial changes, we'll likely wait for some
feedback from several developers before a merge. If you think your changes may
feedback from several developers before a merge. If you think your changes may
be controversial, feel free to discuss them in a GitHub issue before starting to
write any code.

## Travis is your friend

We use Travis to test all code changes. After submitting your pull request,
We use Travis to test all code changes. After submitting your pull request,
remember to check back to see whether Travis has come back with any test
failures. We do get some false negatives. If your pull request failed for
failures. We do get some false negatives. If your pull request failed for
reasons unrelated to your changes, we may still be able to merge your work.

# Additional Resources

* [\#metacpan](http://widget01.mibbit.com/?autoConnect=true&server=irc.perl.org&channel=%23metacpan&nick=) IRC channel on irc.perl.org
- [\#metacpan](http://widget01.mibbit.com/?autoConnect=true&server=irc.perl.org&channel=%23metacpan&nick=)
IRC channel on irc.perl.org

# Current Policies

### What is indexed?

* Perl distributions which contain Perl packages.
- Perl distributions which contain Perl packages.

### When are issues closed?

We want to keep the issue list manageable, so we can focus on what actually
needs fixing. If you feel an issue needs opening again, please add a comment
needs fixing. If you feel an issue needs opening again, please add a comment
explaining why it needs re-opening and we'll look at it again.

* Issues will be closed and moved to [Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) if they are not actual bugs
* Issues we think we have addressed will be closed
* Issues we are not going to take any further action on without more information will be closed
- Issues will be closed and moved to
[Wishlist](https://github.com/CPAN-API/cpan-api/wiki/Wishlist) if they are not
actual bugs
- Issues we think we have addressed will be closed
- Issues we are not going to take any further action on without more information
will be closed
43 changes: 22 additions & 21 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: ["type:Bug"]
assignees: ''

assignees: ""
---

**PLEASE NOTE**

This issue tracker is for bugs in the https://metacpan.org web site. If you are are reporting a bug about anything else, this is most likely not the correct venue. Please use the left side menu for the module you are interested in and click the `Issues` link in order to find the bug tracker for your module.
This issue tracker is for bugs in the https://metacpan.org web site. If you are
are reporting a bug about anything else, this is most likely not the correct
venue. Please use the left side menu for the module you are interested in and
click the `Issues` link in order to find the bug tracker for your module.

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

**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce** Steps to reproduce the behavior:

**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.
**Expected behavior** A clear and concise description of what you expected to
happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**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]

- 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.
- 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.
19 changes: 8 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
name: Feature request
about: Request a feature to be added
title: ''
title: ""
labels: ["type:Feature"]
assignees: ''

assignees: ""
---
**Describe the feature**
A clear and concise description of what the feature is.

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

**Which problem does it solve?**

**Expected behavior**
A clear and concise description of what you expect to see.
**Expected behavior** A clear and concise description of what you expect to see.

**Volunteering**
Are you willing to implement (or help to implement) this feature?
**Volunteering** Are you willing to implement (or help to implement) this
feature?

**Additional context**
Add any other context about the request here.
**Additional context** Add any other context about the request here.
67 changes: 33 additions & 34 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Code scanning - action"
name: 'Code scanning - action'

on:
push:
Expand All @@ -10,39 +10,38 @@ on:

jobs:
CodeQL-Build:

runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Loading

0 comments on commit bdd23aa

Please sign in to comment.