Skip to content

Commit

Permalink
Merge pull request #2322 from StateVoicesNational/adds-sv-uri
Browse files Browse the repository at this point in the history
Updates all codebase uri's to say StateVoicesNational
  • Loading branch information
dwbond authored Dec 5, 2023
2 parents eba154e + ddfb2f7 commit e217a97
Show file tree
Hide file tree
Showing 25 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/moveonorg/spoke
ghcr.io/statevoicesnational/spoke
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ many important organizations!
- Please fill out the Join form there, and once you are on-boarded, we can chat live!
- ProgCode has community guidelines
- We have a weekly(ish) working group at [Progressive HackNight](https://progressivehacknight.org) that organizes in the #wg-spoke_p2p_sms_tool channel in the slack
- Feel free to [create an issue or comment on an existing issue](https://github.com/MoveOnOrg/Spoke/issues) -- Every time we hear from the outside progressive developer community, we do a little dance.
- Feel free to [create an issue or comment on an existing issue](https://github.com/StateVoicesNational/Spoke/issues) -- Every time we hear from the outside progressive developer community, we do a little dance.
- We also welcome reaching out on our [MoveOn Spoke interest form](https://act.moveon.org/survey/spoke-project/) with questions, etc.

In all forums we affirm the [Progressive Coder Community Guidelines](https://docs.google.com/document/d/1coMHvuGf6x6Qn_73SEhOXi_QaoRBM__3Zj6_5TyrmWs/edit#heading=h.ab96v3qhdgk9)
Expand All @@ -26,19 +26,19 @@ gratitude and appreciation of everyone's time and work.
Generally, the first steps are:

- Fork this repository and clone it on your local. Our main branch is called `main`.
- Get a working development environment (see the [ENVIRONMENT](https://github.com/MoveOnOrg/Spoke/blob/main/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md) to onboard and [DEVELOPMENT TIPS](https://github.com/MoveOnOrg/Spoke/blob/main/docs/EXPLANATION-development-guidelines.md) which is included in the explanation section [docs/](https://github.com/MoveOnOrg/Spoke/tree/main/docs))-- reach out through our communication channels (above) if you have issues.
- Get a working development environment (see the [ENVIRONMENT](https://github.com/StateVoicesNational/Spoke/blob/main/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md) to onboard and [DEVELOPMENT TIPS](https://github.com/StateVoicesNational/Spoke/blob/main/docs/EXPLANATION-development-guidelines.md) which is included in the explanation section [docs/](https://github.com/StateVoicesNational/Spoke/tree/main/docs))-- reach out through our communication channels (above) if you have issues.

### Picking an issue

- We mark issues that are good first issues with the [`good first issue` tag](https://github.com/MoveOnOrg/Spoke/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). We have these set aside for first contributions to make it more accessible to get started.
- We mark issues that are good first issues with the [`good first issue` tag](https://github.com/StateVoicesNational/Spoke/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). We have these set aside for first contributions to make it more accessible to get started.
- Comment on the issue and tell us that you're working on it. Feel free to ask any clarifying questions that you have.
- If you have an idea, then create an issue and if possible discuss with us on slack (see communication channels). If it's a big project, please use the [project proposal template](https://github.com/MoveOnOrg/Spoke/issues/new?assignees=&labels=idea+%28underspec%27d%29&template=architecture-proposal.md&title=RFC%3A+%3Cyour-proposal-title%3E). We might follow up to try to arrange a call or video chat to make sure we're all on the same page.
- If you have an idea, then create an issue and if possible discuss with us on slack (see communication channels). If it's a big project, please use the [project proposal template](https://github.com/StateVoicesNational/Spoke/issues/new?assignees=&labels=idea+%28underspec%27d%29&template=architecture-proposal.md&title=RFC%3A+%3Cyour-proposal-title%3E). We might follow up to try to arrange a call or video chat to make sure we're all on the same page.
- If you reach out to us, on github or slack we'll generally try to respond within 1 business day. If you haven't heard from us, please ping us again.

### Working on an issue

- Depending on the part of the codebase you are working on read relevant parts of [EXPLANATION-development-guidelines.md](./docs/EXPLANATION-development-guidelines.md) for some context and common gotchas.
- While working on an issue, run existing tests to make sure they still work (see [How To Run Tests](https://github.com/MoveOnOrg/Spoke/blob/main/docs/HOWTO-run_tests.md) documentation).
- While working on an issue, run existing tests to make sure they still work (see [How To Run Tests](https://github.com/StateVoicesNational/Spoke/blob/main/docs/HOWTO-run_tests.md) documentation).
- Please try adding a test

### Submitting your Pull Request
Expand All @@ -53,10 +53,10 @@ Generally, the first steps are:
Welcome to the project! Once you've completed that first contribution, there are so many different areas of Spoke that you can jump in to work on and it can be overwhelming to know how to continue your journey.

### Finding issues
- All issues that are up for grabs and mostly (if not fully) planned are listed under the [help wanted](https://github.com/MoveOnOrg/Spoke/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label. This is a great place to start if you don't feel attached to any particular issue and just want to keep helping out.
- All issues that are up for grabs and mostly (if not fully) planned are listed under the [help wanted](https://github.com/StateVoicesNational/Spoke/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label. This is a great place to start if you don't feel attached to any particular issue and just want to keep helping out.
- We use our [Area labels](docs/EXPLANATION-labels.md) to categorize issues into which code feature areas they belong in. Feel free to sort by an area you're interested in.
- We use our [Organization labels](docs/EXPLANATION-labels.md) to categorize issues by which organizations are prioritizing them. You can sort by your favorite org and help out there.
- More broadly, there are all sort of different [labels](https://github.com/MoveOnOrg/Spoke/labels) we use to filter the issues down and you can leverage that to help you find work.
- More broadly, there are all sort of different [labels](https://github.com/StateVoicesNational/Spoke/labels) we use to filter the issues down and you can leverage that to help you find work.
- Lastly, you can always ping a project maintainer (@ibrand, and @schuyler1d) to get a read on what's on our radar right now.

### Claiming issues
Expand All @@ -70,7 +70,7 @@ Welcome to the project! Once you've completed that first contribution, there are
- Remember to write tests with your contribution!

### Becoming a regular
Spoke has a concept of [Access Groups](https://github.com/MoveOnOrg/Spoke/wiki/Spoke-Access-Groups) meant to give extra repo privileges to recurring contributors. Access Groups honor community members who are contributing through their issue authorship and also those who contribute code. If you continue to contribute to Spoke, there are pathways towards larger projects and community involvement.
Spoke has a concept of [Access Groups](https://github.com/StateVoicesNational/Spoke/wiki/Spoke-Access-Groups) meant to give extra repo privileges to recurring contributors. Access Groups honor community members who are contributing through their issue authorship and also those who contribute code. If you continue to contribute to Spoke, there are pathways towards larger projects and community involvement.

### Release Process

Expand All @@ -83,7 +83,7 @@ The actual process:
- We create a new stage-main branch at least twice a month:
- The stage-main branch includes the latest approved pull requests in one merged branch
- This ensures that PRs will not contain anything that breaks deployment and also will allow us to see if any PRs negatively interact with each other before they end up merged to main. Why bother with this step? It's helpful to have a separate "release candidate" on the stage-main branch because in earlier testing rounds people weren't sure what had been deployed to staging and having a separate branch makes this explicit and clear.
- After stage-main is created, we deploy it to MoveOn's staging instance. We have a small set of QA volunteers who then run through a list of [QA steps](https://github.com/MoveOnOrg/Spoke/blob/main/docs/HOWTO_QA_GUIDE.md) in order to find bugs and test new features.
- After stage-main is created, we deploy it to MoveOn's staging instance. We have a small set of QA volunteers who then run through a list of [QA steps](https://github.com/StateVoicesNational/Spoke/blob/main/docs/HOWTO_QA_GUIDE.md) in order to find bugs and test new features.
- After QA is completed, and volunteers haven't identified any bugs, we deploy stage-main to production.
- We let stage-main run in production for at least a day, before merging stage-main into the main branch.
- We never roll code directly to prod without first testing on staging.
2 changes: 1 addition & 1 deletion __test__/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (process.env.DEFAULT_SERVICE !== "fakeservice") {
}

// PostgreSQL required because of a conflict between the sqlite and electron binaries
// See: https://github.com/MoveOnOrg/Spoke/issues/1529#issuecomment-623680962
// See: https://github.com/StateVoicesNational/Spoke/issues/1529#issuecomment-623680962
if (process.env.DB_TYPE !== "pg") {
throw "Running Cypress tests against Sqlite is not currently supported";
}
Expand Down
4 changes: 2 additions & 2 deletions __test__/extensions/action-handlers/zapier-action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("zapier-action", () => {
id: 62,
organization_id: 1,
title: "COPY - COPY - Test Campaign for PR 1995",
description: "https://github.com/MoveOnOrg/Spoke/pull/1995",
description: "https://github.com/StateVoicesNational/Spoke/pull/1995",
is_started: true,
due_by: "2021-08-17T00:00:00.000Z",
created_at: "2021-08-14T02:00:08.065Z",
Expand Down Expand Up @@ -430,7 +430,7 @@ describe("zapier-action", () => {
id: 60,
organization_id: 1,
title: "Test Campaign for PR 1995",
description: "https://github.com/MoveOnOrg/Spoke/pull/1995",
description: "https://github.com/StateVoicesNational/Spoke/pull/1995",
is_started: true,
due_by: "2021-08-17T00:00:00.000Z",
created_at: "2021-08-14T00:34:57.590Z",
Expand Down
2 changes: 1 addition & 1 deletion __test__/server/api/campaign/campaign.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ it("save campaign interaction steps, edit it, make sure the last value is set",

// COPIED CAMPAIGN
const copiedCampaign1 = await copyCampaign(testCampaign.id, testAdminUser);
// 2nd campaign to test against https://github.com/MoveOnOrg/Spoke/issues/854
// 2nd campaign to test against https://github.com/StateVoicesNational/Spoke/issues/854
const copiedCampaign2 = await copyCampaign(testCampaign.id, testAdminUser);
expect(copiedCampaign1.data.copyCampaign.id).not.toEqual(testCampaign.id);

Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spoke",
"description": "Mass peer to peer texting tool",
"repository": "https://github.com/moveonorg/spoke",
"repository": "https://github.com/StateVoicesNational/spoke",
"success_url": "/",
"stack": "container",
"env": {
Expand Down
12 changes: 6 additions & 6 deletions docs/EXPLANATION-development-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This document describes tips and current gotchas in our code base and explains the context
for parts that are evolving in a certain direction (or we *want* to evolve in a certain direction).

See [ENVIRONMENT](https://github.com/MoveOnOrg/Spoke/blob/main/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md) to calibrate your development environment, [DEVELOPMENT TIPS](https://github.com/MoveOnOrg/Spoke/blob/main/docs/EXPLANATION-development-guidelines.md), [CONTRIBUTING](../CONTRIBUTING.md) instructions and an overview about how to help and join in development.
See [ENVIRONMENT](https://github.com/StateVoicesNational/Spoke/blob/main/docs/HOWTO_DEVELOPMENT_LOCAL_SETUP.md) to calibrate your development environment, [DEVELOPMENT TIPS](https://github.com/StateVoicesNational/Spoke/blob/main/docs/EXPLANATION-development-guidelines.md), [CONTRIBUTING](../CONTRIBUTING.md) instructions and an overview about how to help and join in development.
The [README](../README.md) is available for deployment when you are working in production with an organization.

## Documentation Organization
Expand Down Expand Up @@ -56,7 +56,7 @@ environment variable:
Spoke was originally implemented with a noSQL-style RethinkDB backend.
For scaling, lack of support, and an easier development environment, MoveOn moved the backend to
use Knex.js. However, instead of trying to reimplement all backend calls which would have been
an immense challenge, we implemented a [rethink-knex-adapter](https://github.com/MoveOnOrg/rethink-knex-adapter)
an immense challenge, we implemented a [rethink-knex-adapter](https://github.com/StateVoicesNational/rethink-knex-adapter)

This legacy leaves us with many remnants from the original rethink connector. Some are nice and leverage
some good parts of having an ORM, but some are prone to bugs and can be confusing.
Expand Down Expand Up @@ -98,10 +98,10 @@ await r.knex('job_request').where({ assigned: true }).where('updated_at', '<', t
There are two specific gotchas:
* Do NOT use knex.insert and instead use `<Model>.save(...)`
* The reasoning is because sqlite does not support `returning()` as such and
[knex has inconsistent behavior for returning id values](https://github.com/MoveOnOrg/rethink-knex-adapter/blob/master/models.js#L206-L214).
[knex has inconsistent behavior for returning id values](https://github.com/StateVoicesNational/rethink-knex-adapter/blob/master/models.js#L206-L214).
Sqlite does not support knex's `returning()` method. This affects running `r.knex.insert(....)`
* Sqlite does not convert datefields in knex.
See for example: https://github.com/MoveOnOrg/Spoke/issues/817
See for example: https://github.com/StateVoicesNational/Spoke/issues/817
One solution is to use r.table(...).getAll which WILL convert them.
Otherwise, make sure your code does the conversion when necessary.
* Knex also has different behavior between database backends for `knex.raw()` queries.
Expand Down Expand Up @@ -156,10 +156,10 @@ we want to add a value to campaign info for that edit page. We might need to edi

* Roles are assigned per-organization. Users can be assigned a cross-organizational property called 'superadmin' which is limited for
actions that could undermine the security of the system or access system-level data.
* Security for top-level graphQL queries are in rootResolvers.RootQuery object in [server/api/schema.js](https://github.com/MoveOnOrg/Spoke/blob/dec93521d54ea46476d2a5c7eb9deeedbd69d53f/src/server/api/schema.js#L1122)
* Security for top-level graphQL queries are in rootResolvers.RootQuery object in [server/api/schema.js](https://github.com/StateVoicesNational/Spoke/blob/dec93521d54ea46476d2a5c7eb9deeedbd69d53f/src/server/api/schema.js#L1122)
* These correspond to e.g. getContact or getOrganization, etc
* Mutations and custom queries are inside the method
* Helper functions are in [server/api/errors.js](https://github.com/MoveOnOrg/Spoke/blob/main/src/server/api/errors.js) which should/will be optimized to use cached info, etc. Each of them will throw an error and therefore cancel the request if the user doesn't have the appropriate access.
* Helper functions are in [server/api/errors.js](https://github.com/StateVoicesNational/Spoke/blob/main/src/server/api/errors.js) which should/will be optimized to use cached info, etc. Each of them will throw an error and therefore cancel the request if the user doesn't have the appropriate access.
* `authRequired(user)` establishes that the user is not anonymous
* `accessRequired(user, orgId, role, allowSuperadmin = false)` will require the user to have a certain role or higher. Pass in `true` to allowSuperadmin if superadmins should be allowed. Generally they should be allowed to do things, but might as well be explicit.
* `assignmentRequiredOrAdminRole(user, organizationId, assignmentId)` makes sure that the user has the assignment in question and is a TEXTER or is an ADMIN. (optional arguments after assignmentId are `contact, assignment` which if already available in the context can speed checking -- those arguments should be loaded manually, and never passed from the client, of course.
Expand Down
8 changes: 4 additions & 4 deletions docs/HOWTO-extend-spoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ can be enabled for only particular organizations. Some examples help:
```

The first enables two action handlers: `ngpvan-action`, `zapier-action` which are in
the [src/extensions/action-handlers](https://github.com/MoveOnOrg/Spoke/tree/main/src/extensions/action-handlers)
the [src/extensions/action-handlers](https://github.com/StateVoicesNational/Spoke/tree/main/src/extensions/action-handlers)
directory. Both of these require additional environment variables to function, so make sure
to read the code or documentation on particular extensions.

The second enables *and restricts* the system to three texter sideboxes. Texter sideboxes, by default,
have all system-included sideboxes on (though they are configurable in the Organization's settings and
per-campaign). They are each in the [src/extensions/texter-sideboxes](https://github.com/MoveOnOrg/Spoke/tree/main/src/extensions/texter-sideboxes) directory.
per-campaign). They are each in the [src/extensions/texter-sideboxes](https://github.com/StateVoicesNational/Spoke/tree/main/src/extensions/texter-sideboxes) directory.

Here are supported extension types with brief descriptions:

Expand Down Expand Up @@ -112,8 +112,8 @@ We recommend production instances use Auth0 for login by default. Additionally
"local login" is configurable so Auth0 doesn't need to be setup. There is also a way to enable
login through Slack. All of these implementations are *mostly* implemented in two files:

* [src/server/auth-passport.js](https://github.com/MoveOnOrg/Spoke/tree/main/src/server/auth-passport.js)
* [src/components/Login.jsx](https://github.com/MoveOnOrg/Spoke/tree/main/src/components/Login.jsx)
* [src/server/auth-passport.js](https://github.com/StateVoicesNational/Spoke/tree/main/src/server/auth-passport.js)
* [src/components/Login.jsx](https://github.com/StateVoicesNational/Spoke/tree/main/src/components/Login.jsx)

However there are a couple places here or there that have hooks -- at least for more sophisticated
integrations. Ideally we will consolidate these hooks into a src/extensions/login/ in the future.
Expand Down
Loading

0 comments on commit e217a97

Please sign in to comment.