Skip to content

Commit 25ab849

Browse files
committed
1 parent 1ba6ab9 commit 25ab849

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

.github/workflows/send-email.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,32 @@ jobs:
9595
9696
See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
9797
98+
- name: Check if email is encoded
99+
id: check_email_encryption
100+
run: |
101+
if [[ "$EMAIL" != *"@"* ]]; then
102+
encoded="true"
103+
else
104+
encoded="false"
105+
fi
106+
echo "encoded=$encoded" >> $GITHUB_OUTPUT
107+
env:
108+
EMAIL: ${{ steps.extract.outputs.email }}
109+
110+
- name: Decode email
111+
id: decode_email
112+
uses: ./.github/actions/encode-decode-string
113+
with:
114+
input_string: ${{ steps.extract.outputs.email }}
115+
encryption_key: ${{ secrets.STRING_ENCRYPTION_KEY }}
116+
operation: "decode"
117+
skip: ${{ steps.check_email_encryption.outputs.encoded == 'false' }}
118+
98119
- name: Send mail (completed)
99120
id: send_email
100121
uses: ./.github/actions/send-email
101122
with:
102-
to: ${{ steps.extract.outputs.email }}
123+
to: ${{ steps.decode_email.outputs.output_string }}
103124
mail_server_username: ${{secrets.MAIL_USERNAME}}
104125
mail_server_password: ${{secrets.MAIL_PASSWORD}}
105126
instance_name: ${{ steps.define.outputs.instance_name }}

.github/workflows/update-request-status-label.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ jobs:
3232
3333
add_label="status:$status_lowercase"
3434
35-
remove_labels=$(gh issue view $issue_number --json labels \
36-
--jq '[.labels[].name | select(test("^status:")?)] | join(",")')
35+
remove_labels=$(gh issue view $issue_number --json labels | \
36+
jq \
37+
-r \
38+
--arg add_label "$add_label" \
39+
-c '[.labels[].name | select(test("^status:")?) | select(. != $add_label)] | join(",")')
3740
3841
echo "Updating issue $issue_number adding label [$add_label] and removing labels [$remove_labels]"
3942

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ repos:
3131
- id: check-github-actions
3232
- id: check-github-workflows
3333
- id: check-readthedocs
34+
35+
- repo: https://github.com/astral-sh/ruff-pre-commit
36+
rev: "v0.5.7"
37+
hooks:
38+
- id: ruff
39+
args: [--fix, --show-fixes]
40+
- id: ruff-format

0 commit comments

Comments
 (0)