Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582284 - git hooks/post-receive.h02-notify-webhook traceback
Summary: git hooks/post-receive.h02-notify-webhook traceback
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
: 560988 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-06 15:16 UTC by Brian Dolbec
Modified: 2019-12-18 07:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Dolbec (RETIRED) gentoo-dev 2016-05-06 15:16:36 UTC
I got a traceback upon doing a git push -f that removed a bad/incorrect commit.

remote: Traceback (most recent call last):
remote:   File "hooks/post-receive.h02-notify-webhook", line 308, in <module>
remote:     data = make_json(old, new, ref)
remote:   File "hooks/post-receive.h02-notify-webhook", line 244, in make_json
remote:     revisions = get_revisions(old, new)
remote:   File "hooks/post-receive.h02-notify-webhook", line 122, in get_revisions
remote:     props = {'id': lines[0].strip().split(' ')[1], 'added': [], 'removed': [], 'modified': []}
remote: IndexError: list index out of range


This is something that should be easy to prevent in the code.  I can make a patch for it if you point me to the source.

Reproducible: Always
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-05-06 15:30:31 UTC
Here's the codebase:
https://github.com/metajack/notify-webhook
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-10-18 18:12:51 UTC
*** Bug 560988 has been marked as a duplicate of this bug. ***
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-10-18 18:13:16 UTC
@dolsen:
did you see the code link before? Fix welcome.
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2016-10-18 18:50:35 UTC
I obviously forgot about this, sorry.  I did start on it, but I must have gotten busy and subsequently forgot about it.

Looking again.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-12-18 07:26:44 UTC
Obsolete