Page MenuHomeSoftware Heritage

Added Webhooks tutorial
ClosedPublic

Authored by cmatrix on Dec 22 2022, 8:05 AM.

Details

Summary

Added tutorial for webhooks for GitHub, GitLab, BitBucket, Gitea, SourceForge in user documentation

Written for the task T4717

Diff Detail

Repository
rDDOC Development documentation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8977 (id=32353)

Rebasing onto 8d04650792...

Current branch diff-target is up to date.
Changes applied before test
commit ee1123fdb44980b21b05f5683016fd5a10599328
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Thu Dec 22 00:01:50 2022 +0530

    Added Webhooks tutorial

See https://jenkins.softwareheritage.org/job/DDOC/job/build-on-diff/297/ for more details.

@anlambert I have seen the webhooks you wrote for these forges and I have written a tutorial for task T4717. vlorentz suggested that you are suitable to review my diff.

vlorentz added inline comments.
user/webhooks/index.rst
1–5 ↗(On Diff #32353)

to remove any ambiguity, if we add other types of webhooks later.

Could you also rename the file user/save_code_now/webhooks/index.rst?

Thanks for writing that doc. I added a couple of inline comments to handle before we can land this.

user/webhooks/index.rst
6 ↗(On Diff #32353)

Intro about webhooks is too vague imho. Could be improved like this:

Webhooks are "user-defined HTTP callbacks" that are triggered by software forges for some events , like pushing new commits to a repository.
Software Heritage offers some dedicated API endpoints to receive webhooks for push events. Basically ...
8 ↗(On Diff #32353)

s/updation/update/

21 ↗(On Diff #32353)

s/Webhook/a webhook/

27 ↗(On Diff #32353)

Add a column (:) at the end of the line (for all forge sections).

29 ↗(On Diff #32353)

You can remove "which".

46 ↗(On Diff #32353)

You can remove "that".

62 ↗(On Diff #32353)

ditto

66 ↗(On Diff #32353)

s/Webhook/the webhook/

This revision now requires changes to proceed.Jan 2 2023, 1:40 PM
cmatrix marked 9 inline comments as done.
  • Updated tutorial for save_code_now webhooks

Made changes and improvements according to the suggestions of reviewers

Build is green

Patch application report for D8977 (id=32419)

Rebasing onto 8d04650792...

Current branch diff-target is up to date.
Changes applied before test
commit b479a87ec781b1b025a8678e26caf6e03ead5ffa
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Tue Jan 3 18:22:56 2023 +0530

    Updated tutorial for save_code_now webhooks

commit ee1123fdb44980b21b05f5683016fd5a10599328
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Thu Dec 22 00:01:50 2022 +0530

    Added Webhooks tutorial

See https://jenkins.softwareheritage.org/job/DDOC/job/build-on-diff/298/ for more details.

Thanks ! Before we can land this, please squash the commits into a single one with the following message:

user: Add webhooks tutorial

Related to T4717
This revision now requires changes to proceed.Jan 3 2023, 2:38 PM
ardumont added inline comments.
user/save_code_now/webhooks/index.rst
10
cmatrix marked an inline comment as done.
  • Implemented changes suggested by @ardumont
  • Squashed commits onto one as suggested by @anlambert
  • Implemented changes suggested by @ardumont
  • Squashed commits onto one as suggested by @anlambert

Build is green

Patch application report for D8977 (id=32426)

Rebasing onto 610632ddbe...

First, rewinding head to replay your work on top of it...
Applying: user: Add webhooks tutorial
Changes applied before test
commit d41292965f73254913f31d9d902e28d831ef3fd3
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Thu Dec 22 00:01:50 2022 +0530

    user: Add webhooks tutorial
    
    Related to T4717

See https://jenkins.softwareheritage.org/job/DDOC/job/build-on-diff/302/ for more details.

Build is green

Patch application report for D8977 (id=32427)

Rebasing onto 610632ddbe...

First, rewinding head to replay your work on top of it...
Applying: user: Add webhooks tutorial
Changes applied before test
commit d9cccddbc9ee6fb12ccd09b431eb4805a170e6f0
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Thu Dec 22 00:01:50 2022 +0530

    user: Add webhooks tutorial
    
    Related to T4717

See https://jenkins.softwareheritage.org/job/DDOC/job/build-on-diff/303/ for more details.

Looks good to me, thanks again !

This revision is now accepted and ready to land.Jan 3 2023, 4:08 PM

What merge strategy should I use? When I enter arc land it says the merge strategy is ambiguous and asks me to choose the strategy explicitly. Should I choose merge or squash?

What merge strategy should I use? When I enter arc land it says the merge strategy is ambiguous and asks me to choose the strategy explicitly. Should I choose merge or squash?

Please rebase the diff on the origin/master branch and update it. Then merge your feature branch into the master one and push the changes to remote.

Rebase branch onto master

This revision was landed with ongoing or failed builds.Jan 3 2023, 6:03 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D8977 (id=32431)

Rebasing onto 610632ddbe...

Current branch diff-target is up to date.
Changes applied before test
commit ee50b5be9dc7584bb967da75e4cd708a462888bf
Author: Chaitanya Bisht <chaitanya.bisht10@gmail.com>
Date:   Thu Dec 22 00:01:50 2022 +0530

    user: Add webhooks tutorial
    
    Related to T4717

See https://jenkins.softwareheritage.org/job/DDOC/job/build-on-diff/304/ for more details.

@cmatrix Thanks and congrats on your landed diff ;)

@cmatrix Thanks and congrats on your landed diff ;)

Thanks, @ardumont and others who guided me towards my first contribution to SWH! I look forward to making more contributions to this organisation and learning new things.