Skip to content

Add editing capabilities to the release process#498

Merged
mgoerens merged 1 commit intoopenshift-helm-charts:mainfrom
mgoerens:edit_trigger_workflow
Mar 13, 2026
Merged

Add editing capabilities to the release process#498
mgoerens merged 1 commit intoopenshift-helm-charts:mainfrom
mgoerens:edit_trigger_workflow

Conversation

@mgoerens
Copy link
Contributor

This commit extends the range of actions that can be defined in the release_info.json to add the "edit" keyword. "edit" maps a path (to a workflow) to a callable. The callable must be defined in the ALLOWED_EDIT_FUNCTION dict, and must accepts a single argument (the path to the workflow to edit).

This commit also adds an edit function that modifies the trigger of a workflow from pull_request to pull_request_target.


Tested in fork with following adjustments:

Note following divergences between my forks and the actual repos. These differences should be irrelevant with regards to the changes discussed in this PR:

  • Auto release PR would normally merge automatically. This fail to occur in my tests because GitHub Actions is not permitted to approve pull requests in my fork of development. This isn't fixed on purpose to avoid having to revert the release after each of my tests.
  • end to end tests are not run upon release (to speed up my testing)
  • release_info.json is just a modification of the version number (doesn't contain the list of changes as it would normally)

This commit extends the range of actions that can be defined in the
release_info.json to add the "edit" keyword. "edit" maps a path
(to a workflow) to a callable. The callable must be defined in
the ALLOWED_EDIT_FUNCTION dict, and must accepts a single argument (the
path to the workflow to edit).

This commit also adds an edit function that modifies the trigger of a
workflow from pull_request to pull_request_target.

Signed-off-by: Matthias Goerens <mgoerens@redhat.com>
This was referenced Mar 12, 2026
@mgoerens mgoerens requested a review from komish March 12, 2026 17:06
@mgoerens
Copy link
Contributor Author

There seems to be a linting error for a file that hasn't been modified by this PR. Not sure why this would pop up now, but we should address it separately.

Copy link
Contributor

@jsm84 jsm84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This allows pull_request workflows to exist in dev, while updating affected workflows to use pull_request_target for prod and stage upon release. I'd say it fits the bill.

@komish
Copy link
Contributor

komish commented Mar 12, 2026

@mgoerens I opened up a separate PR for the linting error, and I'm disregarding here.

@komish komish changed the title Add edition capabilities to the release process Add editing capabilities to the release process Mar 12, 2026
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mgoerens mgoerens merged commit c55434d into openshift-helm-charts:main Mar 13, 2026
38 of 39 checks passed
@mgoerens mgoerens deleted the edit_trigger_workflow branch March 13, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants