Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Add accountability to issue edits #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nolash
Copy link

@nolash nolash commented Jan 13, 2022

Thanks, this looks perfect for a small, personal issues use-case.

Before I'd start using this, I would need some things:

  • an easily unwindable history of issues, that would not require me to negotiate changes across all the issues in the repo.
  • an option to enforce signatures (doesn't have to be gpg, could plugin others aswell)

The current state of this PR is meant as a proposal for an initial albeit brittle implementation of this feature.

You'll find my contacts via my profile if you wanna discuss off-platform :)

Archive and fingerprint previous issue edit for faster rendering of
single issue history.

Signature on fingerprint.

All optional.

Commit as object for feature discussion.
@nolash nolash changed the title Add accountability to issue edits WIP Add accountability to issue edits Jan 13, 2022
Copy link
Owner

@dspinellis dspinellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Not sure how this will make the history faster. Isn't git log on the issue's directory fast enough?

I also don't understand how this is / can-be a plugin, given that you call directly archive_by_path .

I added some comments for improving the code.

# signature message is the signature of the TAR archive wrapping the three items, added in the sequence defined by archive_by_path
gpg_key=$(git config --get user.signingKey)
if [ -z "$gpg_key" ]; then
echo "no gpg key"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo 'No GPG key' 1>&2

opt_archive=1
opt_sign=1

sig_by_state() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment describing what this function does. Consider also expanding sig.

h=$(sha1sum a.tar.gz | awk '{ print $1; }')
popd
mv -v $t/a.tar.gz $path/${now}_${h}.tar.gz
sig_by_state $1 $h
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please eliminate the -v options to tar, cp, mv. By default the operation should be silent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants