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

Add workflow to auto-assign incident issues to the Incident project #9

Closed
wants to merge 1 commit into from

Conversation

LaRiffle
Copy link
Member

Fixes

Fixes #8

Description

Finally I've put the filter on the label directly on the call to reusable workflow
I've also added a trigger at labelling events.

Definition of Done

  • I followed the Arkhn Code Book (I swear!).
  • I have written tests for the code I added or updated.
  • I have updated the documentation according to my changes.
  • I have updated the deployment configuration if needed.

@LaRiffle LaRiffle added the type/improvement Minor improvements not introducing a new feature label Jan 10, 2023
Copy link
Contributor

@clementjumel clementjumel left a comment

Choose a reason for hiding this comment

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

This will work only for issues open on this repository, no? I believe this doesn't fix #8, we need to add the same workflow call to all the repos (or perhaps you just want to do that later?)

@LaRiffle
Copy link
Member Author

@clementjumel I guess it will work for all because it is in .github repo, right?

@LaRiffle
Copy link
Member Author

LaRiffle commented Jan 10, 2023

Or maybe not... See https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization
Any advice on how to do this without creating a workflow in each and every repo?

@clementjumel
Copy link
Contributor

@clementjumel I guess it will work for all because it is in .github repo, right?

I might be wrong but I don't think so!

Or maybe not... See https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization
Any advice on how to do this without creating a workflow in each and every repo?

This is where mono-repos shine 😇

Imo we do have to create a workflow in each repo. For the future, we simply need to make sure that all new repository derives from a template where the workflow is implemented so it should not be too troublesome. In the meantime, adding a starter workflow could be the right way to go, to make the addition of the new files less troublesome!

Copy link
Contributor

@clementjumel clementjumel left a comment

Choose a reason for hiding this comment

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

I explained why in the comment, but I don't think this will work! 😬


jobs:
incident-report:
if: ${{ github.event.label.name == 'type/incident' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this will work: what you did was a good solution for a labelling event, ie when you add a label to an issue (like documented here) but you have 2 cases: labelling event or issue (re-)opening, and in the 2nd case this will likely not work (for instance you can have several labels).

We need to

  • add a solution like this one in the mix, but then we need to be smart on the if clause
  • simplify this to work only on labelling event ; I don't think this will work when an issue is created with a label already, but we never know

@LaRiffle
Copy link
Member Author

LaRiffle commented Jan 24, 2023

Will close this one in favor of deployment-template#20

@LaRiffle LaRiffle closed this Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/improvement Minor improvements not introducing a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a label condition on the project assignment reusable workflow
2 participants