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

Check if new commits do not remove members #479

Open
JoeySpronck opened this issue Sep 28, 2022 · 3 comments
Open

Check if new commits do not remove members #479

JoeySpronck opened this issue Sep 28, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@JoeySpronck
Copy link
Contributor

Now it could be that people remove members once they leave. But the profile page should be set to inactive. And member should be added to former employees.

@JoeySpronck JoeySpronck added the enhancement New feature or request label Sep 28, 2022
@keelinm
Copy link
Collaborator

keelinm commented Nov 23, 2022

build should fail if a member page is deleted (during build, check the list of existing member pages and previous member pages and verify one is not removed??)

@drepeeters
Copy link
Contributor

I've tried using the GitPython API to check for differences between new and previous commits. With a locap git repository it was able to detect deleted files. However, while running in a github workflow a new 'local' repository is created inside a docker I believe. Therefore this new 'local' repository can be seen as the first version and therefore has no previous version to compare differences with.

@drepeeters
Copy link
Contributor

drepeeters commented Feb 17, 2023

As you may have seen I was able to post notification in the webteam channel. However, it also posted a notification in case a new member file is added. This is ofcourse not what we want, this was the result of a forgotten "if-statement" in the workflow action.

The following code has to be updated so that it include an if-statement associated with a deleted file:

name: Member removal notification
on:
  push:
    branches: 
      - main
    paths:
      - 'contents/**'
  workflow_dispatch:

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:        
      - name: Notify dedicated teams channel
        if: **insert if-statement here**
        uses: jdcargile/[email protected]
        with:
          github-token: ${{ github.token }} # this will use the runner's token.
          ms-teams-webhook-uri: ${{ secrets.TEAMS_CHANNEL_WEBHOOK_URL }}
          notification-summary: 'Warning! A member file has been removed. Contact someone from the Webteam and make sure the member is added back.'
          notification-color: 17a2b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants