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

[Scheduled] Automate "Last Updated" Field in metadata table #180

Open
mukmookk opened this issue Aug 31, 2023 · 2 comments
Open

[Scheduled] Automate "Last Updated" Field in metadata table #180

mukmookk opened this issue Aug 31, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mukmookk
Copy link
Collaborator

mukmookk commented Aug 31, 2023

In order to maintain the most recent update information for our .md files, we are considering automating the update of the "Last Updated" field using GitHub Actions.

Works expected:

  1. Create a GitHub Action workflow for the repository.
  2. Within the workflow, scan for changed .md files in the commit.
  3. For each changed .md file, modify the "Last Updated" field to reflect the current date.
  4. Commit the updated .md files with a message like "Automatically updated Last Updated field".
@jeesang7
Copy link
Contributor

좋은 아이디어 입니다
해당 작업이 devops, CI/CD 이런 기술들을 공부하는데 좋은 기회가 될 것 같습니다.
특히, devops 쪽에 관심있는 분들은 이모티콘으로 반응 주시면 같이 협업할 기회를 마련하도록 하겠습니다

@mukmookk
Copy link
Collaborator Author

mukmookk commented Sep 22, 2023

기능을 굳이 도입해야할지에 대해서 고민이 있습니다.

현재 두 가지 방식으로 수행을 할 수 있을 것으로 예상이 되는 상황입니다.

1. pre-commit의 훅을 활용

Pros

  • 별도의 커밋 없이도, 기여자가 md 파일을 커밋하면 자동으로 커밋 전에 pre-commit 훅에 등록된 내용이 반영됩니다. -> 커밋 로그가 깔끔해집니다.

Cons

  • pre-commit이라는 별도의 파이썬 패키지를 설치 후, 해당 훅을 등록해야 합니다. pip install pre-commit -> 문서 번역 기여 시의 장벽으로 동작할 우려가 있습니다.

단점이 다소 치명적이기에 CI 방식으로 고려를 했습니다만 마찬가지로 우려 사항이 존재합니다.

2. Github Action을 통한 CI

Pros

  • 사용자가 굳이 관리하지 않아도 깃허브에서 알아서 날짜를 변경해줍니다.

Cons

  • Github Action에서 스크립트를 실행하여, 날짜를 업데이트해도 결국 CI 파이프라인에서 commit, push를 해야합니다.
  • 때문에 md 파일을 커밋할 시, 반드시 Github Action에서 수행하는 별도의 commit이 붙게 됩니다. -> 커밋 내역이 매우 지저분해질 우려가 있습니다.

때문에 굳이 꼭 도입을 해야할까라는 고민이 드는 상황입니다.

@mukmookk mukmookk self-assigned this Sep 22, 2023
@mukmookk mukmookk added enhancement New feature or request help wanted Extra attention is needed labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants