Skip to content

Commit

Permalink
Fix default message links
Browse files Browse the repository at this point in the history
Fixes #9

Update titles throughout the documentation.
  • Loading branch information
CasperWA committed Jul 6, 2022
1 parent 64b99b0 commit a3580fd
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd_updated_default_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
type: string
default: main
update_dependencies_pr_body_file:
description: "Relative path to a PR body file from the root of the repository, which is used in the 'CI - Update dependencies' workflow, if used. Example: `'.github/utils/pr_body_update_deps.txt'`."
description: "Relative path to a PR body file from the root of the repository, which is used in the 'CI - Update dependencies PR' workflow, if used. Example: `'.github/utils/pr_body_update_deps.txt'`."
required: false
type: string
default: ""
Expand Down Expand Up @@ -262,8 +262,8 @@ jobs:
PR_BODY_FILE=.tmp_pr-body_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}.txt
echo "PR_BODY_FILE=${PR_BODY_FILE}" >> $GITHUB_ENV
echo -e "### Update dependencies\n\nAutomatically created PR from [\`${{ inputs.permanent_dependencies_branch }}\`](https://github.com/${{ github.repository }}/tree/${{ inputs.permanent_dependencies_branch }}).\n\nThe PR is based on the ['CI - Update dependencies PR' workflow](https://github.com/CasperWA/ci-cd#ci---update-dependencies-pr-ci_update_dependenciesyml) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd).\n\n#### To do\n" > ${PR_BODY_FILE}
echo "Using default PR body (similar to the one used in the 'CI - Update dependencies' workflow)."
echo -e "### Update dependencies\n\nAutomatically created PR from [\`${{ inputs.permanent_dependencies_branch }}\`](https://github.com/${{ github.repository }}/tree/${{ inputs.permanent_dependencies_branch }}).\n\nThe PR is based on the ['CI - Update dependencies PR' workflow](https://CasperWA.github.io/ci-cd/latest/workflows/ci_update_dependencies/) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd).\n\n#### To do\n" > ${PR_BODY_FILE}
echo "Using default PR body (similar to the one used in the 'CI - Update dependencies PR' workflow)."
echo "REMOVE_PR_BODY_FILE=true" >> $GITHUB_ENV
else
echo "Using found PR body text file at ${{ inputs.update_dependencies_pr_body_file }}."
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_check_pyproject_dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI - Check dependencies
name: CI - Check pyproject.toml dependencies

on:
workflow_call:
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
PR_BODY_FILE=.tmp_pr-body_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}.txt
echo "PR_BODY_FILE=${PR_BODY_FILE}" >> $GITHUB_ENV
echo -e "### Update dependencies (\`pyproject.toml\`)\n\nAutomatically created PR based on the ['CI - Check dependencies' workflow](https://github.com/CasperWA/ci-cd#ci---check-dependencies-ci_check_pyproject_dependenciesyml) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd)." > ${PR_BODY_FILE}
echo -e "### Update dependencies (\`pyproject.toml\`)\n\nAutomatically created PR based on the ['CI - Check pyproject.toml dependencies' workflow](https://CasperWA.github.io/ci-cd/latest/workflows/ci_check_pyproject_dependencies/) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd)." > ${PR_BODY_FILE}
echo "Using default PR body."
echo "REMOVE_PR_BODY_FILE=true" >> $GITHUB_ENV
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
PR_BODY_FILE=.tmp_pr-body_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}.txt
echo "PR_BODY_FILE=${PR_BODY_FILE}" >> $GITHUB_ENV
echo -e "### Update dependencies\n\nAutomatically created PR from [\`${{ inputs.permanent_dependencies_branch }}\`](https://github.com/${{ github.repository }}/tree/${{ inputs.permanent_dependencies_branch }}).\n\nThe PR is based on the ['CI - Update dependencies PR' workflow](https://github.com/CasperWA/ci-cd#ci---update-dependencies-pr-ci_update_dependenciesyml) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd).\n\n#### To do\n\n- [ ] Check that the diff is sensible, and that tests and builds pass with the new dependency versions.\n${{ inputs.extra_to_dos }}" > ${PR_BODY_FILE}
echo -e "### Update dependencies\n\nAutomatically created PR from [\`${{ inputs.permanent_dependencies_branch }}\`](https://github.com/${{ github.repository }}/tree/${{ inputs.permanent_dependencies_branch }}).\n\nThe PR is based on the ['CI - Update dependencies PR' workflow](https://CasperWA.github.io/ci-cd/latest/workflows/ci_update_dependencies/) in [CasperWA/ci-cd](https://github.com/CasperWA/ci-cd).\n\n#### To do\n\n- [ ] Check that the diff is sensible, and that tests and builds pass with the new dependency versions.\n${{ inputs.extra_to_dos }}" > ${PR_BODY_FILE}
echo "Using default PR body."
echo "REMOVE_PR_BODY_FILE=true" >> $GITHUB_ENV
else
Expand Down
6 changes: 3 additions & 3 deletions docs/workflows/ci_cd_updated_default_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Furthermore, this workflow can optionally update the `latest` [mike](https://git
Hence, if it is important to run CI/CD workflows for pull requests, consider passing a PAT as a secret to this workflow represented by the `PAT` secret.

!!! important
If this is to be used together with the [CI - Update dependencies](./ci_update_dependencies.md) workflow, the `pr_body_file` supplied to that workflow (if any) should match the `update_depednencies_pr_body_file` input in this workflow and be immutable within the first 8 lines, i.e., no check boxes or similar in the first 8 lines.
Indeed, it is recommended to not supply `pr_body_file` to the [CI - Update dependencies](./ci_update_dependencies.md) workflow as well as to not supply the `update_dependencies_pr_body_file` in this workflow in this case.
If this is to be used together with the [CI - Update dependencies PR](./ci_update_dependencies.md) workflow, the `pr_body_file` supplied to that workflow (if any) should match the `update_depednencies_pr_body_file` input in this workflow and be immutable within the first 8 lines, i.e., no check boxes or similar in the first 8 lines.
Indeed, it is recommended to not supply `pr_body_file` to the [CI - Update dependencies PR](./ci_update_dependencies.md) workflow as well as to not supply the `update_dependencies_pr_body_file` in this workflow in this case.

## Expectations

Expand All @@ -32,7 +32,7 @@ The repository contains the following:
| `git_email` | A git user's email address (used to set the 'user.email' config option). | **_Yes_** | | _string_ |
| `permanent_dependencies_branch` | The branch name for the permanent dependency updates branch. | No | ci/dependency-updates | _string_ |
| `default_repo_branch` | The branch name of the repository's default branch. More specifically, the branch the PR should target. | No | main | _string_ |
| `update_dependencies_pr_body_file` | Relative path to a PR body file from the root of the repository, which is used in the 'CI - Update dependencies' workflow, if used.</br></br>Example: `'.github/utils/pr_body_update_deps.txt'`. | No | _Empty string_ | _string_ |
| `update_dependencies_pr_body_file` | Relative path to a PR body file from the root of the repository, which is used in the 'CI - Update dependencies PR' workflow, if used.</br></br>Example: `'.github/utils/pr_body_update_deps.txt'`. | No | _Empty string_ | _string_ |
| `update_docs` | Whether or not to also run the 'docs' workflow job. | No | `false` | _boolean_ |
| `update_python_api_ref` | Whether or not to update the Python API documentation reference.</br></br>**Note**: If this is 'true', 'package_dir' is _required_. | No | `true` | _boolean_ |
| `package_dir` | Path to the Python package directory relative to the repository directory.</br></br>Example: `'src/my_package'`.</br></br>**Important**: This is _required_ if 'update_docs' and 'update_python_api_ref' are 'true'. | **_Yes_ (if 'update_docs' and 'update_python_api_ref' are 'true')** | | _string_ |
Expand Down
6 changes: 3 additions & 3 deletions docs/workflows/ci_check_pyproject_dependencies.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: CI - Check dependencies
title: CI - Check pyproject.toml dependencies
---
<!-- markdownlint-disable-next-line MD025 -->
# CI - Check dependencies (`ci_check_pyproject_dependencies.yml`)
# CI - Check pyproject.toml dependencies (`ci_check_pyproject_dependencies.yml`)

This workflow runs an [Invoke](https://pyinvoke.org) task to check dependencies in a `pyproject.toml` file.

Expand Down Expand Up @@ -39,7 +39,7 @@ The repository contains the following:

## Usage example

The following is an example of how a workflow may look that calls _CI - Check dependencies_.
The following is an example of how a workflow may look that calls _CI - Check pyproject.toml dependencies_.
It is meant to be complete as is.

```yaml
Expand Down
8 changes: 4 additions & 4 deletions docs/workflows/ci_update_dependencies.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: CI - Update dependencies
title: CI - Update dependencies PR
---
<!-- markdownlint-disable MD038 -->
<!-- markdownlint-disable-next-line MD025 -->
# CI - Update dependencies (`ci_update_dependencies.yml`)
# CI - Update dependencies PR (`ci_update_dependencies.yml`)

This workflow creates a PR if there are any updates in the `permanent_dependencies_branch` branch that have not been included in the `default_repo_branch` branch.

This workflow works nicely together with the [CI - Check dependencies](./ci_check_pyproject_dependencies.md) workflow, and the same value for `permanent_dependencies_branch` should be used.
This workflow works nicely together with the [CI - Check pyproject.toml dependencies](./ci_check_pyproject_dependencies.md) workflow, and the same value for `permanent_dependencies_branch` should be used.
In this way, this workflow can be called on a schedule to update the dependencies that have been merged into the `permanent_dependencies_branch` branch into the `default_repo_branch` branch.

The main point of having this workflow is to have a single PR, which can be squash merged, to merge several dependency updates performed by [Dependabot](https://github.com/dependabot/dependabot-core) or similar.
Expand Down Expand Up @@ -50,7 +50,7 @@ There are no expectations of the repo when using this workflow.

## Usage example

The following is an example of how a workflow may look that calls _CI - Update dependencies_.
The following is an example of how a workflow may look that calls _CI - Update dependencies PR_.
It is meant to be complete as is.

```yaml
Expand Down
4 changes: 2 additions & 2 deletions docs/workflows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ This section contains all the available callable/reusable workflows:
- [CD - Release (`cd_release.yml`)](./cd_release.md)
- [CI - Activate auto-merging for PRs (`ci_automerge_prs.yml`)](./ci_automerge_prs.md)
- [CI/CD - New updates to default branch (`ci_cd_updated_default_branch.yml`))](./ci_cd_updated_default_branch.md)
- [CI - Check dependencies (`ci_check_pyproject_dependencies.yml`)](./ci_check_pyproject_dependencies.md)
- [CI - Update dependencies (`ci_update_dependencies.yml`)](./ci_update_dependencies.md)
- [CI - Check pyproject.toml dependencies (`ci_check_pyproject_dependencies.yml`)](./ci_check_pyproject_dependencies.md)
- [CI - Update dependencies PR (`ci_update_dependencies.yml`)](./ci_update_dependencies.md)

0 comments on commit a3580fd

Please sign in to comment.