Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opensearch-project/project-website
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: opensearch-project/project-website
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: pre-commit
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 3 commits
  • 1 file changed
  • 3 contributors

Commits on Aug 2, 2023

  1. Update _scripts/_malformeddates.sh

    Co-authored-by: Romain Tartière <romain@blogreen.org>
    Signed-off-by: David Tippett <Dtaivpp@gmail.com>
    dtaivpp and smortex authored Aug 2, 2023
    Copy the full SHA
    3569e03 View commit details
  2. Update _scripts/_malformeddates.sh

    Co-authored-by: Romain Tartière <romain@blogreen.org>
    Signed-off-by: David Tippett <Dtaivpp@gmail.com>
    dtaivpp and smortex authored Aug 2, 2023
    Copy the full SHA
    8ccdb12 View commit details
  3. Merge pull request #1798

    Pre commit hook fix
    nateynateynate authored Aug 2, 2023
    Copy the full SHA
    a8440f2 View commit details
Showing with 13 additions and 2 deletions.
  1. +13 −2 _scripts/_malformeddates.sh
15 changes: 13 additions & 2 deletions _scripts/_malformeddates.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

#!/bin/sh
online_and_timezone=$(grep -Er --files-match '^online: true$' | xargs grep --files-with-match '^tz:')
if [ -n "${malformed_event_dates}" ]; then
echo "Online events should not have a time-zone. Offending files:" >&2
echo "${malformed_event_dates}" >&2
exit 1
fi
malformed_timezones=$(grep -Er --files-match '^tz:[^/]*$')
if [ -n "${malformed_timezones}" ]; then
echo "Time-zones should be in the form 'Continent/City'. Offending files:" >&2
echo "${malformed_timezones}" >&2
exit 1
fi
malformed_event_dates=$(grep -Er --files-without-match '^eventdate: [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [-+][0-9]{4}$' _events)
if [ -n "${malformed_event_dates}" ]; then
echo "Malformed event date in:" >&2