Page MenuHomeSoftware Heritage

Store submitter consent info when creating an add forge request
ClosedPublic

Authored by ardumont on Mar 21 2022, 5:45 PM.

Details

Summary

Prior to this, it was simply ignored by the api.

Related to T4056

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27685
Build 43323: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 43322: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7404 (id=26747)

Could not rebase; Attempt merge onto 82d7c4bd39...

Updating 82d7c4bd..1f00a2d0
Fast-forward
 .../migrations/0002_authorized_null_comment.py     | 32 ++++++++++
 .../migrations/0003_request_submitter_consent.py   | 18 ++++++
 swh/web/add_forge_now/models.py                    |  3 +-
 swh/web/add_forge_now/tests/test_migration.py      | 49 ++++++++++++++++
 swh/web/api/views/add_forge_now.py                 |  3 +
 .../templates/add_forge_now/create-request.html    |  2 +-
 swh/web/tests/api/views/test_add_forge_now.py      | 68 +++++++++++++---------
 7 files changed, 146 insertions(+), 29 deletions(-)
 create mode 100644 swh/web/add_forge_now/migrations/0002_authorized_null_comment.py
 create mode 100644 swh/web/add_forge_now/migrations/0003_request_submitter_consent.py
Changes applied before test
commit 1f00a2d0940a199af943aed7be96c00f3988cd2f
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Mar 21 17:44:21 2022 +0100

    Store submitter consent info when creating an add forge request
    
    Related to T4057

commit 60666aa2d1aacdc0b8306ecf92009a44c46fa9a0
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Mar 21 17:22:20 2022 +0100

    Allow no comment when submitting a new add forge creation request
    
    Related to T4057

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1522/ for more details.

Could you give it a more explicit name? eg. forward_submitter_username or submitter_username_forward_constent?

Could you give it a more explicit name? eg. forward_submitter_username or submitter_username_forward_constent?

sure, going for submitter_forward_username to stay consistent with other field prefixed with submitter_

ardumont added a subscriber: jayeshv.

Adapt according to review from @vlorentz and @jayeshv:

  • rename new field to submitter_forward_username in model
  • fix the html field name to that one ^
  • actually check (or not) the field in ui tests
This revision is now accepted and ready to land.Mar 22 2022, 11:18 AM

Build is green

Patch application report for D7404 (id=26755)

Rebasing onto 60666aa2d1...

Current branch diff-target is up to date.
Changes applied before test
commit ae6ae29b5a184f630ff65fb56d985c9d54e46ba4
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Mar 21 17:44:21 2022 +0100

    Store submitter consent to use their name when discussing with forge
    
    When creating an add forge request and the user check the box, it's now stored in the
    backend while it was ignored prior to this diff.
    
    Related to T4057

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1525/ for more details.

This revision was landed with ongoing or failed builds.Mar 22 2022, 12:10 PM
This revision was automatically updated to reflect the committed changes.

Build was aborted

Patch application report for D7404 (id=26764)

Rebasing onto ac5e79103c...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-1528-D7404.
Changes applied before test

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1528/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1528/console