Skip to content

Feature to auto manage GHA references (OSOE-1207) #548

@Piedone

Description

@Piedone

The validate-this-gha-refs workflow and the actions it calls check if the @branch references in this project are properly updated when changing actions or workflows, so one can run the most up to date version of them. I'd like us to improve on this in the following ways, to instead manage the references automatically:

  • The validate-this-gha-refs workflow, if triggered by a pull request, should only run if the dont-auto-manage-gha-refs is present on the PR.
  • If the dont-auto-manage-gha-refs label is NOT present, a different workflow should update all affected references to that of the current branch in a new commit when there's a commit pushed under a PR (if any needs to be updated), by default. If the PR was approved just now (i.e. the current trigger is that), then it should update all references to the PR's target branch (i.e. revert the PR branch references). If the developer pushes new commits after the PR approval, then it should be handled as if it were a new PR. I.e., the PR branch reference should be added in a new commit again, until the next approve.

Note that the PR branch update needs a similar approach than the validate-this-gha-refs workflow and its actions, only updating those references which actually point to workflows or actions that changes. This might need multiple passes, because the first such pass may discover the outermost leaf changes, but then changing their callers will necessitates references to those updated...

I attempted this, with heavy help by Copilot, but that approach seemed futile. Maybe something worth salvaging, though: https://github.com/Lombiq/GitHub-Actions/pull/547/files/8a3a0821c96fb6686ea15f8d57ebed0e97c2e985..7e50f84337a88159ac6f6140b0ce490c1fa32290

Jira issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions