diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 008550826..51f878342 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,8 +36,8 @@ danger: - export CI_MERGE_REQUEST_IID=${CI_OPEN_MERGE_REQUESTS#*!} - npx danger ci except: - refs: - - $CI_DEFAULT_BRANCH + variables: + - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME allow_failure: true lint-js: @@ -115,8 +115,8 @@ docs-deploy: script: - curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline only: - refs: - - $CI_DEFAULT_BRANCH + variables: + - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME changes: - "docs/**/*" @@ -141,8 +141,8 @@ pages: paths: - public only: - refs: - - $CI_DEFAULT_BRANCH + variables: + - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME docker: stage: deploy @@ -157,8 +157,8 @@ docker: - docker build -t $CI_REGISTRY_IMAGE . - docker push $CI_REGISTRY_IMAGE only: - refs: - - $CI_DEFAULT_BRANCH + variables: + - $CI_DEFAULT_BRANCH == $CI_COMMIT_REF_NAME include: - template: Jobs/Dependency-Scanning.gitlab-ci.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 490404721..05162696f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Layout: use accent color for "floating action button" (mobile compose button). - ServiceWorker: don't serve favicon, robots.txt, and others from ServiceWorker. +- Datepicker: correctly default to the current year. ## [3.0.0] - 2022-12-25 diff --git a/app/soapbox/components/ui/datepicker/datepicker.tsx b/app/soapbox/components/ui/datepicker/datepicker.tsx index 3c3c9b8e2..bef846709 100644 --- a/app/soapbox/components/ui/datepicker/datepicker.tsx +++ b/app/soapbox/components/ui/datepicker/datepicker.tsx @@ -20,7 +20,7 @@ const Datepicker = ({ onChange }: IDatepicker) => { const [month, setMonth] = useState(new Date().getMonth()); const [day, setDay] = useState(new Date().getDate()); - const [year, setYear] = useState(2022); + const [year, setYear] = useState(new Date().getFullYear()); const numberOfDays = useMemo(() => { return getDaysInMonth(month, year); diff --git a/app/soapbox/components/ui/select/select.tsx b/app/soapbox/components/ui/select/select.tsx index 8c2369ce5..e405fa240 100644 --- a/app/soapbox/components/ui/select/select.tsx +++ b/app/soapbox/components/ui/select/select.tsx @@ -11,7 +11,7 @@ const Select = React.forwardRef((props, ref) => { return (