Commit graph

58 commits

Author SHA1 Message Date
dependabot[bot]
23757459d6 Bump sigstore/cosign-installer from 3.1.0 to 3.1.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 23:29:44 +02:00
dependabot[bot]
eb80d69f66 Bump sigstore/cosign-installer from 3.0.5 to 3.1.0
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.5 to 3.1.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.5...v3.1.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:44:57 +02:00
dependabot[bot]
74966309db Bump docker/build-push-action from 4.1.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:38:24 +02:00
dependabot[bot]
f9524da530 Bump docker/build-push-action from 4.0.0 to 4.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 14:28:27 +02:00
dependabot[bot]
79b5a0cf9f Bump docker/login-action from 2.1.0 to 2.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 14:28:16 +02:00
dependabot[bot]
c4733e7ec1 Bump sigstore/cosign-installer from 3.0.3 to 3.0.5
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.3 to 3.0.5.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.3...v3.0.5)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 13:09:05 +02:00
dependabot[bot]
c653d49a0b Bump sigstore/cosign-installer from 3.0.2 to 3.0.3
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 22:37:40 +02:00
dependabot[bot]
c6a2e54aa7 Bump sigstore/cosign-installer from 3.0.1 to 3.0.2
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 20:32:15 +02:00
Thomas Lauf
360fc2292a
Merge pull request #12 from GothenburgBitFactory/dependabot/github_actions/sigstore/cosign-installer-3.0.1 2023-03-09 19:02:50 +01:00
dependabot[bot]
1b73033855
Bump sigstore/cosign-installer from 2.8.1 to 3.0.1
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 2.8.1 to 3.0.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v2.8.1...v3.0.1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 23:11:37 +00:00
Thomas Lauf
59ea9b7717
Merge pull request #9 from GothenburgBitFactory/dependabot/github_actions/docker/build-push-action-4.0.0
Bump docker/build-push-action from 3.3.0 to 4.0.0
2023-02-05 18:02:16 +01:00
dependabot[bot]
a6230d2180
Bump docker/build-push-action from 3.3.0 to 4.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.3.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.3.0...v4.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-05 16:51:08 +00:00
Thomas Lauf
ce448217eb Use lowercase owner in repository name 2023-02-05 17:17:22 +01:00
Thomas Lauf
a5e98bcc9a Update copyright range 2023-02-01 08:48:42 +01:00
Thomas Lauf
808b5b0d0c Add workflows to update Docker images for E2E tests 2023-02-01 08:48:42 +01:00
Thomas Lauf
29479d064e Add E2E tests 2023-02-01 08:48:42 +01:00
Thomas Lauf
487dfed981 Add unit tests 2023-02-01 08:48:42 +01:00
Thomas Lauf
056d239f35 Add main function to on_modify.py
Make it unit-testable
2023-01-29 21:05:26 +01:00
Thomas Lauf
431db0fb84 Rename hook script to on_modify.py
Rename test accordingly
2023-01-29 21:05:26 +01:00
Thomas Lauf
b2d78bb677 Configure Dependabot for GitHub actions 2023-01-29 21:05:26 +01:00
Thomas Lauf
3b84f306e6 Add .gitignore 2023-01-29 21:05:26 +01:00
Thomas Lauf
9df07b68ab Add DCO 2023-01-29 21:05:26 +01:00
Thomas Lauf
1aa6384337 Add AUTHORS 2023-01-29 21:05:26 +01:00
Thomas Lauf
a730d7e33f Add LICENSE 2023-01-29 21:04:17 +01:00
Thomas Lauf
cca9d98045 Add README.md 2023-01-29 21:04:17 +01:00
Tomas Babej
ded46f8ad8 doc: Update copyright to 2021 2021-05-10 21:43:26 +02:00
Thomas Lauf
0937e80274 Update Copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
d999fcfa37 Set python version explicitly to python3
- Closes #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
eb9fb2bdc5 Mark byte literals
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
93aa943a7d Switch to python 3
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
5e04aff3db Process task annotate
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
cc24ea76fb Small refactoring
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
38ddeec03c Fix for task delete
- `task delete` does add 'end' to modified JSON but not remove key 'start'
- Stop time tracking when task is deleted

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
2504493de6 Overhaul test
- Update example JSONs
- Test only for active time tracking
- Test resulting intervals, not resulting output

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
f375654523 Make hook run in both python 2 and 3
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Dennis Schridde
4af061abda on-modify.timewarrior: Deal with non-UTF-8 characters in input data from taskwarrior
When input data from taskwarrior (e.g. via bugwarrior) contains UTF-8-illegal characters, `on-modify.timewarrior` would fail:
```
Traceback (most recent call last):
  File "$HOME/.task/hooks/on-modify.timewarrior", line 42, in <module>
    old = json.loads(sys.stdin.readline())
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 1042: invalid continuation byte
```

This is fixed by manually decoding from stdin's underlying binary I/O object and replacing encoding errors with the Unicode replacement character [1].

[1]: https://docs.python.org/3/library/codecs.html#error-handlers
2021-05-10 21:43:26 +02:00
Dennis Schridde
9f8a4c8161 Fix on-modify.timewarrior hook for tasks with multi line description
If the description contained multiple lines, it would be formatted as a
bytes object, including Python's `b""` marker for byte literals and any
newlines.  This would then be passed literally to `timew`, which would
then choke on it, because it would record the newlines in its database.

This patch simply gets rid of the string join/split operations and the
encoding, which solves the issue.

Since we pass arrays instead of strings to `subprocess.call`, we are not
subject to command injection security vulnerabilities.

Fixes: 0b6dbf7e12d30fc791a524501e3483989a092a8c
2021-05-10 21:43:26 +02:00
Dennis Schridde
1e46ca5888 on-modify.timewarrior: Fix "from __future__ imports must occur at the beginning of the file"
Fixes the following error with Python 3.6.8:
```
  File "$HOME/.task/hooks/on-modify.timewarrior", line 33
    from __future__ import print_function
SyntaxError: from __future__ imports must occur at the beginning of the file
```
2021-05-10 21:43:26 +02:00
Thomas Lauf
2a49f54d60 Add output of new-tag-warnings to check
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
c15cfcadd4 Make on-modify.timewarrior executable so tests will work 2021-05-10 21:43:26 +02:00
Thomas Lauf
a07ee6b31c Make Popen spawn intermediate shell
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
Thomas Lauf
99116bcdd7 Rename test-file
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-10 21:43:26 +02:00
quazgar
7160e4f65b MAINT: Removing comment. 2021-05-10 21:43:26 +02:00
quazgar
21e55a3ee5 MAINT: on-modify.timewarrior imports from future
This should fix #216.

Untested commit.
2021-05-10 21:43:26 +02:00
Harish Ved
0a08541161 ReviewFixes: Reset tags instead of stop/start task; formatting changes 2021-05-10 21:43:26 +02:00
Harish Ved
7f10219760 Handling modifications to description/tag/project for task
The taskwarrior extension script `on-modify.timewarrior` did not forward
modifications for description/tag/project to `timew`.

This resulted in non-existent tasks (with old tag etc) contiued to be
tracked and not updated

[Closes #105](https://github.com/GothenburgBitFactory/timewarrior/issues/105)
2021-05-10 21:43:26 +02:00
Thomas Lauf
18eb53bc4a TI-94 #98 Fix Command Injection Security Vulnerability in on-modify.timewarrior
- Thanks to Aaron Fields
- Add unit test?
- What about missing ```if '.' in project:```?
2021-05-10 21:43:26 +02:00
Simon Ruderich
f026056230 Use https:// link for opensource.org 2021-05-10 21:43:26 +02:00
Paul Beckingham
4c7fec1525 TI-32: taskwarrior hook script doesn't stop recording waiting task
- Thanks to Yury Videneev.
2021-05-10 21:43:26 +02:00
Thomas Lauf
75be890476 extensions: Make extensions conform with PEP8 2021-05-10 21:43:26 +02:00