cds-snc / notification-planning-core

Project planning for GC Notify Core Team
0 stars 0 forks source link

Streamline the external contribution PRs #198

Open jimleroyer opened 9 months ago

jimleroyer commented 9 months ago

Description

As an external contributor of GCNotify, I want to submit code / documentation fixes to the code base, So that I can improve the product and fix issues by my own.

As a developer of GCNotify, I want PRs coming from external contributors to be merged through an easier yet formal process, So that I can review and merge code into the code base in a safe manner, And without having to create a new PR with manual changes of my own with proposed code.

WHY are we building?

To promote and streamline contributions from non-CDS members.

WHAT are we building?

Make PRs from external contributors easy to merge in. At the moment, we cannot merge these for security purposes as the CI should not automatically run code that could contain malicious contributions once a PR is opened.

On the other hand though, there is no process to merge a PR once it has deemed safe. We need to get past this limitations. Ideally, keeping the original PR would be good to identify the external authors as well.

The process would be as follows:

  1. External contributor opens a new PR.
  2. Static code analysis runs on the suggested code, but no regular CI actions should run such as building the application.
  3. The GCNotify team assigns 2 developers to review the PR and evaluate its safety and value. Possibly tag someone from the security team as well, depending on the nature and complexity of the changes (i.e. a regular documentation changes would not require security).
  4. A potential back and forth for code changes request occur between the GCNotify reviewers and external contributor.
  5. If deemed safe and valuable, then the GCNotify reviewers tag the PR with a public-safe protected label.
  6. Once the public-safe tag is applied, the usual CI/CD Github actions are ran, such as the test action.
  7. Any new code changes applied to the branch removes the public-safe tag.
  8. A final proper review is conducted by 2 GCNotify developers, different from the previous review phase.
  9. Once approved and with the public-safe tag still on (to guarantee there were no new code changes by the external contributor in the meantime), we are good to merge in staging.

VALUE created by our solution

We are more receptive to external contributions which can improve our software offering.

Acceptance Criteria

QA Steps

Additional information

Alternatives

It's possible we could make use of Github default's mechanism for external contributors, but it might open up some security concerns. A few thoughts:

Resources