Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Aug 15, 2024
1 parent 1ba6ab9 commit 25ab849
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/send-email.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,32 @@ jobs:
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Check if email is encoded
id: check_email_encryption
run: |
if [[ "$EMAIL" != *"@"* ]]; then
encoded="true"
else
encoded="false"
fi
echo "encoded=$encoded" >> $GITHUB_OUTPUT
env:
EMAIL: ${{ steps.extract.outputs.email }}

- name: Decode email
id: decode_email
uses: ./.github/actions/encode-decode-string
with:
input_string: ${{ steps.extract.outputs.email }}
encryption_key: ${{ secrets.STRING_ENCRYPTION_KEY }}
operation: "decode"
skip: ${{ steps.check_email_encryption.outputs.encoded == 'false' }}

- name: Send mail (completed)
id: send_email
uses: ./.github/actions/send-email
with:
to: ${{ steps.extract.outputs.email }}
to: ${{ steps.decode_email.outputs.output_string }}
mail_server_username: ${{secrets.MAIL_USERNAME}}
mail_server_password: ${{secrets.MAIL_PASSWORD}}
instance_name: ${{ steps.define.outputs.instance_name }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/update-request-status-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ jobs:
add_label="status:$status_lowercase"
remove_labels=$(gh issue view $issue_number --json labels \
--jq '[.labels[].name | select(test("^status:")?)] | join(",")')
remove_labels=$(gh issue view $issue_number --json labels | \
jq \
-r \
--arg add_label "$add_label" \
-c '[.labels[].name | select(test("^status:")?) | select(. != $add_label)] | join(",")')
echo "Updating issue $issue_number adding label [$add_label] and removing labels [$remove_labels]"
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ repos:
- id: check-github-actions
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.7"
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

0 comments on commit 25ab849

Please sign in to comment.