OPINION BY
Senior Judge ROCHELLE S. FRIEDMAN.Albert Battiste appeals from the December 21, 2012, order of the Court of Common Pleas of Allegheny County (trial court) granting the motion for summary judgment filed by the Borough of East McKeesport (Borough) and Ronald Ba-chner, the Borough’s Code Enforcement Officer/Building Code Official. We reverse in part, affirm in part, and dismiss Battiste’s claim for occupancy permits as moot.
In June 1999, Battiste purchased an eleven-unit apartment building known as the Continental Arms in the Borough of East McKeesport. (Am.Compl. ¶ 4.) From June 1999 until September 2007, Battiste leased units in the building to residential tenants. (Id. ¶ 5; Battiste Dep., 1/9/12, at 22.) In 2008, Battiste sought to renovate the building and convert the living room in each unit into a second bedroom. Battiste also proposed converting one apartment into a common area for all tenants, thereby reducing the number of apartments to ten. (Am.Compl. ¶¶ 8, 9.) On February 25, 2008, Battiste applied for a building permit, which the Borough thereafter issued. (Id. ¶¶ 11,12.)1
Battiste met with Bachner to discuss the renovations. (Id. ¶ 13.) Battiste averred that Bachner led him to believe that if certain tasks were completed, Bachner would issue an occupancy permit. (Id.) Bachner also made demands on Battiste *421unrelated to the construction and implied that he would issue occupancy permits if Battiste complied. (Id. ¶¶ 19, 21.)
Thereafter, Battiste formally requested three occupancy permits, which Bachner refused to issue. (Id. ¶ 25.)2 On March 20, 2009, Battiste reported Ba-chner’s conduct to the Pennsylvania Department of Labor and Industry. On March 25, 2009, Bachner issued Battiste a stop work order.3 At that time, Battiste had completed renovations on three of the units; five other units were 85% complete. (Id. ¶ 28.)
Unable to finish the renovations, Bat-tiste, on August 10, 2010, filed a five-count complaint against the Borough and Ba-chner, seeking rescission of the stop work order and issuance of the occupancy permits. The Borough and Bachner filed preliminary objections. After the trial court dismissed some of the claims with prejudice, the Borough and Bachner filed an answer and new matter. Battiste thereafter filed an amended complaint, and the Borough and Bachner filed an answer and new matter. Battiste did not reply to the new matter. Thereafter, both sides filed motions for summary judgment. At the time of argument, only the promissory es-toppel and mandamus counts remained.
On December 21, 2012, the trial court granted summary judgment in favor of the Borough and Bachner. As to the promissory estoppel claim, the trial court determined that Battiste did not meet his burden to secure rescission of the stop work order and the issuance of the occupancy permits. Despite Battiste’s allegation that Bachner told him he would issue occupancy permits if certain tasks were performed or problems remedied, in his deposition testimony, Battiste specifically denied that Bachner made any promises to him. (Bat-tiste Dep., 1/9/12, at 86-93; id., 1/10/12, at 194-95.)
As to the mandamus action wherein Bat-tiste requested that Bachner and the Borough be ordered to lift the stop work order and issue the occupancy permits, the trial court stated that Bachner has not been the Borough code official since 2012, Bachner has no Borough authority, and summary judgment was appropriate as to Bachner. As to the Borough, the trial court initially observed, sua sponte, that Battiste did not reply to the Borough’s new matter and that the factual allegations therein were deemed admitted. Specifically, Battiste had abandoned the original use of the property and expanded the use beyond the permit work without notifying the Borough and Bachner of the changes. Because of the deemed admissions, the trial court concluded that Battiste could not meet his burden of proving that he had a clear legal right to mandamus relief.
Specifically, the trial court observed that Battiste admitted in his testimony that he intended to rent only to women.4 This practice would have been a violation of the *422Pennsylvania Human Relations Act5 and the Fair Housing Act.6 Although Battiste never rented the apartments only to women, he failed to show that he had a clear legal right to his requested relief. More importantly, the trial court also determined that when Battiste applied for the occupancy permits, he did not list any tenants on the applications. Although Battiste was alerted to the deficiency, he did not remedy the matter. As such, the trial court granted the motion for summary judgment filed by the Borough and Bachner. This appeal followed.
Summary judgment is proper “when the pleadings, depositions, answers to interrogatories, and admissions on file, together with any affidavits, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law.” McConnaughey v. Building Components, Inc., 536 Pa. 95, 637 A.2d 1331, 1333 (1994). “[A]n appellate court may reverse a grant of summary judgment if there has been an error of law or an abuse of discretion.” Weaver v. Lancaster Newspapers, Inc., 592 Pa. 458, 926 A.2d 899, 902-03 (2007). “[T]he issue as to whether there are no genuine issues as to any material fact presents a question of law....” Id.
Initially, this court will address the mandamus claim. Mandamus relief is proper where there is a clear and specific legal right in the plaintiff, a corresponding duty in the defendant, and lack of an adequate and appropriate remedy. See Lindy Homes, Inc. v. Sabatini, 499 Pa. 478, 453 A.2d 972, 973-74 (1982). “Mandamus will not lie to control the exercise of official discretion, but it will issue to compel the exercise of discretion or to prevent the arbitrary or fraudulent exercise thereof ... [a]nd where plaintiffs have a clear legal right to the issuance of a building permit, then mandamus is the proper means to compel the officials to issue it.” Commercial Properties, Inc. v. Peternel, 418 Pa. 304, 211 A.2d 514, 517-18 (1965). “[W]here the right to the [building] permit is clear, the issuance thereof by the proper official is no more than the performance of a ministerial act which admits of no discretion in the municipal officer, and mandamus is both appropriate and proper to compel performance.” Lhormer v. Bowen, 410 Pa. 508, 188 A.2d 747, 749-50 (1963). “If a permit cannot rightfully be refused in the first instance, it cannot be arbitrarily revoked after issuance.” Gallagher v. Building Inspector, City of Erie, 432 Pa. 301, 247 A.2d 572, 574 (1968).
Battiste argues that the trial court erred in granting summary judgment in favor of the Borough and Bachner on Bat-tiste’s mandamus claim because there is sufficient evidence for a fact-finder to reasonably determine that Bachner arbitrarily issued the stop work order. We agree.
As previously stated, Battiste obtained the building permit in February 2008, authorizing him to convert the one-unit apartments into two-unit apartments and reduce the number of apartments to ten. One year later, Battiste requested occupancy permits, which Bachner denied. Battiste reported Bachner’s behavior to the Pennsylvania Department of Labor and Industry on March 20, 2009. Five days later, on March 25, 2009, Bachner issued a stop work order.
Pursuant to 34 Pa.Code § 403.81(a), a building code official may issue a stop work order when the official determines that construction violates the Uniform Construction Code (UCC) or is being per*423formed in a dangerous or unsafe manner. Additionally, the stop work order must contain the reason for the order and list the required conditions for construction to resume. Id.
Battiste argues that the stop work order did not list any reasons for its issuance and did not list the conditions needed to resume construction. The stop work order stated that “the building code official has determined that work being performed is outside the scope of the permit, unsafe conditions may be present, and violations of the [UCC] as it relates to safety, alterations, use, occupancy, and other construction details are unclear that may affect compliance.” (Battiste Dep., 1/9/12, Ex. L.) The stop work order further directed Battiste to meet with the building code official to discuss matters of construction and compliance. (Id.)
Here, the stop work order stated that violations “may” exist but did not positively identify any violations. Further, it did not list the required conditions for work to resume, it merely directed Battiste to meet with Bachner. Moreover, to the extent that the stop work order was issued because Battiste might rent only to women in the future, that is not a valid reason for denying a building permit or, as is the case here, the issuing of a stop work order under 34 Pa.Code § 408.81(a). See Commercial Properties, Inc., 211 A.2d at 520. (“That plaintiffs have improperly proposed unacceptable tenants is not a ground for the denial of the building permit.”)
The Borough and Bachner maintain, however, that the trial court properly concluded that the work performed by Battiste exceeded the scope of the building permit because the building permit application did not disclose Bat-tiste’s intention to convert one apartment into a common area.7 However, viewing the record in the light most favorable to Battiste, a question of fact remains as to whether Battiste performed work outside the scope of the building permit and thus, whether Bachner issued the stop work order arbitrarily. Battiste testified to the following:
Q. Well, did you tell [Bachner] that you were going to transform though [sic] Unit 1 of the building into an actual common room for everyone to use? Did you tell [Bachner] that at the time you *424applied for this Construction Permit Application?
A. I told him it was going to be a common room, but there was no transformation to that room. It was just the way it always was except for the refrigerator and stove that were taken out. We didn’t add walls or take down walls.
(Battiste Dep., 1/9/12, at 45.) (Emphasis added.)
Because there is a genuine issue of material fact as to whether Battiste performed work outside the scope of the building permit and thus, whether Bachner issued the stop work order arbitrarily, the trial court erred in granting the Borough’s and Bachner’s motion for summary judgment with respect to Battiste’s mandamus action against the stop work order.
We next address Battiste’s mandamus action as to the occupancy permits and conclude that this issue is moot because the units are uninhabitable.
Although neither party argues the mootness of the issuance of the occupancy permits, we may sua sponte raise the issue of mootness as “courts cannot ‘decide moot or abstract questions, nor can we enter a judgment or decree to which effect cannot be given.’” Orfield v. Weindel, 52 A.3d 275, 277 (Pa.Super.2012) (citation omitted); see also Department of Public Welfare, Fairview State Hospital v. Kallinger, 532 Pa. 292, 615 A.2d 730 (1992) (sua sponte dismissing the appeal as moot). The mootness doctrine provides:
“The problems arise from events occurring after the lawsuit has gotten under way-changes in the facts or in the law-which allegedly deprive the litigant of the necessary stake in the outcome. The mootness doctrine requires that ‘an actual case or controversy must be extant at all stages of review, not merely at the time the complaint is filed.’ ”
Pap’s A.M. v. City of Erie, 571 Pa. 375, 812 A.2d 591, 599-600 (2002) (citation omitted).
In this case, the facts have changed. Since the stop work order was issued more than five years ago there have been no physical changes to the building and it has remained unoccupied. Assuming arguen-do that Battiste may have been entitled to occupancy permits when he first applied for them, Battiste conceded that the building and space therein is presently uninhabitable. “I would still like the occupancy permits for those three units. But ... it doesn’t matter any more because the building right now is uninhabitable.” (Battiste Dep., 2/24/12, at 363.) (Emphasis added.) Battiste stated that he needs to contact the health department and that dampness, mold, and a leaking roof prevent the building from being habitable. (Id.) Thus, at this juncture, issuance of the occupancy permits is moot.
Next we address Battiste’s promissory estoppel claim with respect to the building permit.8 In a promissory estop-pel claim, a plaintiff must show:
(1) the promisor made a promise that would reasonably be expected to induce action or forbearance on the part of the promisee; (2) the promisee actually took action or refrained from taking action in reliance on the promise; and (3) injustice can be avoided only by enforcing the promise.
Pelusa v. Kistner, 970 A.2d 530, 533 (Pa. Cmwlth.2009).
*425Here, Battiste admitted in his deposition testimony that he could not point to a definite or specific promise that Ba-chner made to him with respect to any permits. (Battiste Dep., 1/10/12, at 194-95.) Because Battiste admitted that Ba-chner did not make any promises to him, the trial court properly granted summary judgment in favor of the Borough and Bachner on Battiste’s promissory estoppel claim.
Accordingly, we reverse the trial court’s order granting summary judgment in favor of the Borough only as to Battiste’s mandamus action to lift the stop work order and remand for further proceedings. We dismiss as moot Battiste’s claim for occupancy permits and affirm the trial court order in all other respects.
ORDER
AND NOW, this 3rd day of June, 2014, we reverse that part of the December 21, 2012, order of the Court of Common Pleas of Allegheny County granting summary judgment in favor of the Borough of East McKeesport only as to Albert Battiste’s mandamus action to lift the stop work order and remand for further proceedings. We dismiss as moot Battiste’s claim for occupancy permits and affirm the order in all other respects.
Jurisdiction relinquished.
. On the building permit application, Battiste described the construction as "L Room into a [] Bed Room 10 units.” (Battiste Dep., 1/9/12, Ex. H.)
. Bachner denied the occupancy permits because Battiste furnished insufficient information to determine the correct occupancy use group under the Borough’s building code. (Battiste Dep., 1/9/12, at 174.)
. Although not raised before the trial court, Borough and Bachner argue in their brief that Battiste did not appeal the denial of the occupancy permits and did not appeal the issuance of the stop work order. Because these issues were raised for the first time on appeal to this court, they are waived. Pa. R.A.P. 302(a).
.Letters mailed out by Battiste and his wife seeking tenants for the building stated “Since it is unlawful to advertise apartments for rent on a gender basis, the only way to inform you about [the apartments] is to inform you directly.” (Battiste Dep., 1/9/12, Ex. G.)
. Act of October 27, 1955, P.L. 744, as amended, 43 P.S. §§ 951-963.
. 42 U.S.C. §§ 3601-3619.
. We note that Battiste did not file a reply to the Borough’s and Bachner’s new matter. The trial court sua sponte determined that Battiste, therefore, admitted the allegations in the new matter, including the allegations that Battiste had abandoned the original use of the property and changed or expanded the use beyond the permitted work. (Trial Ct. Op., 4/9/13, at 12.) Because of the deemed admission, the trial court determined that Battiste could not meet the first prong of mandamus of proving a clear legal right to relief. (Id.) We agree with Battiste that the trial court erred in determining sua sponte that Battiste admitted all of the allegations in the Borough's and Bachner's new matter.
In Gotwalt v. Dellinger, 395 Pa.Super. 439, 577 A.2d 623, 627 (1990), the Superior Court addressed Pa. R.C.P. No. 1037(c) and stated that “where a party believes that averments contained in new matter require a response, and where the opposing party has failed to file such a response in a timely fashion, the proper method for obtaining a judgment against that party is by motion to the court.” Here, the Borough and Bachner did file a motion for summary judgment with the trial court. However, they did not raise the argument that they were entitled to summary judgment because Battiste did not file a reply to the new matter. A trial court should not act as a party's advocate. Yount v. Pennsylvania Department of Corrections, 600 Pa. 418, 966 A.2d 1115, 1119 (2009). "For a trial court to raise an argument in favor of summary judgment sua sponte and grant summary judgment thereon risks depriving the court [of] the benefit of advocacy on the issue, and depriving the parties [of] the opportunity to be heard.” Id.
. Because this court has determined that issuance of the occupancy permits is moot, we need not address Battiste's promissory estop-pel claim with respect to the occupancy permits.