Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust lint action to also perform a second job of validating that a changie entry was added #82

Closed
sheldonhull opened this issue Aug 12, 2024 · 0 comments

Comments

@sheldonhull
Copy link
Contributor

sheldonhull commented Aug 12, 2024

  • changie action for anything other than pull requests created by Renovate Bot should require a changie entry in .changes/unreleased to be included.
  • If a label called no-changie-required then this can be bypassed.
  • If a label called dependencies is set then this will also be a bypass.
  • This is a reusable workflow using the same pattern as current files in .github/workflows.
  • It should be combined with linting action as a second independent job so current lint invocation calls this job + the changie validation job.
  • Replace deprecated set-output command with echo "{name}={value}" >> $GITHUB_OUTPUT

Additional requirements:

  • must have .changes directory else skip.
sheldonhull referenced this issue in DelineaXPM/dsv-github-action Aug 12, 2024
Fixes #56

Add changie validation job to lint action in `.github/workflows/lint.yml`.

* **Add changie-validation job:**
  - Check for `.changes` directory and skip validation if not found.
  - Check for changie entry in `.changes/unreleased`.
  - Check for `no-changie-required` or `dependencies` label and skip validation if present.
  - Fail if no changie entry and no relevant label found, and post a comment on the pull request if validation fails.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/dsv-github-action/issues/56?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull sheldonhull transferred this issue from DelineaXPM/dsv-github-action Aug 12, 2024
sheldonhull added a commit that referenced this issue Aug 12, 2024
Fixes #82

Add changie validation job to lint action.

* Add a new job `changie-validation` to `.github/workflows/lint.yml` to check for changie entries in `.changes/unreleased` directory.
* Skip the `changie-validation` job if the `.changes` directory does not exist.
* Skip the `changie-validation` job if the labels `no-changie-required` or `dependencies` are set.
* Replace deprecated `set-output` command with `echo "{name}={value}" >> $GITHUB_OUTPUT` in the `changie-validation` job.
* Add a comment using the gh cli if a changie entry is required, ensuring only a single comment is made and updated if it was closed.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/82?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant