From 6b67c712c96302aba05ca303ae4c57e7e42df8eb Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Thu, 14 Nov 2024 13:22:42 +1100 Subject: [PATCH] Added actions workflow to clean up stale PRs (#540) * Added actions workflow to clean up stale PRs --------- Co-authored-by: Md Nadim Hossain --- .../pull-request-reviewer-reminder.yml | 21 +++++++++++++++++++ .../jsonapi/FieldEnhancer/YamlEnhancer.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull-request-reviewer-reminder.yml diff --git a/.github/workflows/pull-request-reviewer-reminder.yml b/.github/workflows/pull-request-reviewer-reminder.yml new file mode 100644 index 000000000..47188d8a2 --- /dev/null +++ b/.github/workflows/pull-request-reviewer-reminder.yml @@ -0,0 +1,21 @@ +name: 'Close stale issues and PRs' +on: + workflow_dispatch: + schedule: + - cron: '30 1 * * *' + +permissions: + contents: write # only for delete-branch option + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + exempt-pr-labels: "DO NOT MERGE" + stale-issue-message: 'This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.' + days-before-stale: 28 + days-before-close: 14 diff --git a/modules/tide_api/src/Plugin/jsonapi/FieldEnhancer/YamlEnhancer.php b/modules/tide_api/src/Plugin/jsonapi/FieldEnhancer/YamlEnhancer.php index 6f19e0c69..c663fd204 100644 --- a/modules/tide_api/src/Plugin/jsonapi/FieldEnhancer/YamlEnhancer.php +++ b/modules/tide_api/src/Plugin/jsonapi/FieldEnhancer/YamlEnhancer.php @@ -23,7 +23,7 @@ class YamlEnhancer extends ResourceFieldEnhancerBase { */ protected function doUndoTransform($data, Context $context) { $data = Yaml::decode($data); - + if (!empty($data['markup']['#markup'])) { $data['processed_text']['#text'] = $this->processText($data['markup']['#markup']); }