From 4533546c85f7b8fa486f97f23ad44930f3fb26ec Mon Sep 17 00:00:00 2001 From: Luis Moris Fernandez Date: Mon, 28 Oct 2024 13:05:56 +0100 Subject: [PATCH 1/2] fix dependencies with old naming forgotten when event_count was renamed --- inst/assets/css/{event_count.css => hierarchical_count_table.css} | 0 inst/assets/js/{event_count.js => hierarchical_count_table.js} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename inst/assets/css/{event_count.css => hierarchical_count_table.css} (100%) rename inst/assets/js/{event_count.js => hierarchical_count_table.js} (100%) diff --git a/inst/assets/css/event_count.css b/inst/assets/css/hierarchical_count_table.css similarity index 100% rename from inst/assets/css/event_count.css rename to inst/assets/css/hierarchical_count_table.css diff --git a/inst/assets/js/event_count.js b/inst/assets/js/hierarchical_count_table.js similarity index 100% rename from inst/assets/js/event_count.js rename to inst/assets/js/hierarchical_count_table.js From e40bed90da4438987612a75cad9eae3bff5ecb3d Mon Sep 17 00:00:00 2001 From: Luis Moris Fernandez Date: Tue, 29 Oct 2024 17:03:16 +0100 Subject: [PATCH 2/2] include workflows --- .../hotfix_pull_request_template.md | 11 +++++ ...te.md => release_pull_request_template.md} | 0 .github/workflows/hotfix_pr.yml | 48 +++++++++++++++++++ .github/workflows/release_pr.yml | 12 ++--- 4 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/hotfix_pull_request_template.md rename .github/PULL_REQUEST_TEMPLATE/{pull_request_template.md => release_pull_request_template.md} (100%) create mode 100644 .github/workflows/hotfix_pr.yml diff --git a/.github/PULL_REQUEST_TEMPLATE/hotfix_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/hotfix_pull_request_template.md new file mode 100644 index 0000000..1abc9f2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/hotfix_pull_request_template.md @@ -0,0 +1,11 @@ +# Hotfix checklist + +- [ ] Bumped minor version number on both DESCRIPTION and NEWS.md + +- [ ] Build passes pipeline checks + +- [ ] The new changes do not affect the API + +- [ ] The new changes do not affect the documentation (including screenshots) + +- [ ] The new changes do not impact the QC report \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/release_pull_request_template.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/release_pull_request_template.md diff --git a/.github/workflows/hotfix_pr.yml b/.github/workflows/hotfix_pr.yml new file mode 100644 index 0000000..3208240 --- /dev/null +++ b/.github/workflows/hotfix_pr.yml @@ -0,0 +1,48 @@ +name: Create a PR link for hotfix issues +on: + issues: + types: [opened, labeled, edited] + +jobs: + create-pr: + if: contains(github.event.issue.labels.*.name, 'hotfix') # This ensures the job only runs if the 'hotfix' label is present + runs-on: ubuntu-latest + permissions: + issues: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Create PR link and post in comment + id: pr-link-creation + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE: ${{ github.event.issue.html_url }} + run: | + version=$(echo "${{ github.event.issue.title }}" | sed -n 's/.*rc\/\(v[0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p') + + # Early return if issue name is not correct + if [ -z "$version" ]; then + gh issue comment ${{ github.event.issue.number }} --body "Version number is not present or incorrect." + exit 1 + fi + + branch_name="hf/$version" + + branch_text="Expected branch name: \`$branch_name\`" + + echo "Creating PR link" + title=$(echo ${{ github.event.issue.title }} | jq -sRr @uri)hotfix + pr_url_text="https://github.com/${{github.repository}}/compare/main...${branch_name}?quick_pull=1&template=hotfix_pull_request_template.md&title=${title}&labels=hotfix" + body_url="PR Link: [pull request](<${pr_url_text}>)." + + body="$branch_text $body_url" + + echo "Creating comment" + gh issue comment ${{ github.event.issue.number }} --body "$body" + + + + + diff --git a/.github/workflows/release_pr.yml b/.github/workflows/release_pr.yml index 2a025dd..69c7a75 100644 --- a/.github/workflows/release_pr.yml +++ b/.github/workflows/release_pr.yml @@ -5,7 +5,7 @@ on: jobs: create-pr: - if: contains(github.event.issue.labels.*.name, 'Release') # This ensures the job only runs if the 'Release' label is present + if: contains(github.event.issue.labels.*.name, 'release') # This ensures the job only runs if the 'release' label is present runs-on: ubuntu-latest permissions: issues: write @@ -30,14 +30,14 @@ jobs: branch_name="rc/$version" - branch_text="A new branch named \`$branch_name\` should be created for your PR." + branch_text="Expected branch name: \`$branch_name\`" echo "Creating PR link" - title=$(echo ${{ github.event.issue.title }} | jq -sRr @uri) - pr_url_text="https://github.com/${{github.repository}}/compare/main...${branch_name}?quick_pull=1&template=pull_request_template.md&title=${title}&labels=release" - body_url="A link to create a pull request into main is available in [pull request](<${pr_url_text}>)." + title=$(echo ${{ github.event.issue.title }} | jq -sRr @uri)hotfix + pr_url_text="https://github.com/${{github.repository}}/compare/main...${branch_name}?quick_pull=1&template=release_pull_request_template.md&title=${title}&labels=hotfix" + body_url="PR Link: [pull request](<${pr_url_text}>)." - body="$branch_text $body_url" + body="$branch_text $body_url" echo "Creating comment" gh issue comment ${{ github.event.issue.number }} --body "$body"