Relative Content

Tag Archive for bashgithubgithub-actionspull-request

Pull request folder validation with github acttion

i am getting some pull requests from other branches to merge it to main branch..but before merging i need to check whether the pull request affecting filepath is already exists or not in main branch..because i don’t want to overwrite the old one…if it exists it should echo this file path already exists with complete filepath of pullrequest(adding pr number along with the complete filepath to the message will be good if possible) and may have many subfolders in all branches, need to check all.
consider for ex:
branch1 has folder1/subfolder1/file1.txt
main branch also have folder1/subfolder1/file1.txt with same names
may be i have changed some data to branch1 text file and created a pull request to merge it..it should not merge(shoud not overwrite).it should say already exists and if we don’t have the same path in main branch with same names, then it should create